/* =========================================================================
   ui.css — Reusable UI components (SedUI)
   Overlay, confirm dialog, alert dialog.
   ========================================================================= */

.sui-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.sui-dialog {
    background: var(--panel-background-color, #ffffff);
    border: 1px solid var(--splitter-color, #d0d0d0);
    border-radius: var(--default-border-radius, 5px);
    width: 440px;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    animation: sui-dialog-in 0.12s ease-out;
}

@keyframes sui-dialog-in {
    from { transform: scale(0.96); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

/* -------------------------------------------------------------------------
   Header
   ------------------------------------------------------------------------- */

.sui-dialog-header {
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--splitter-color, #eee);
    flex-shrink: 0;
}

.sui-dialog-title {
    font-family: var(--default-label-font);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--subheading-text-color, #555);
}

/* -------------------------------------------------------------------------
   Body
   ------------------------------------------------------------------------- */

.sui-dialog-body {
    padding: 16px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--default-text-color, #333);
    overflow-y: auto;
    white-space: pre-wrap;
}

/* Icon + text layout inside body */
.sui-dialog-body-icon-wrap {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.sui-dialog-body-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    margin-top: 2px;
}

.sui-dialog-body-text {
    flex: 1;
    white-space: pre-wrap;
}

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */

.sui-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 10px 16px;
    border-top: 1px solid var(--splitter-color, #eee);
    flex-shrink: 0;
}

/* -------------------------------------------------------------------------
   Type variants — tint the title for alert types
   ------------------------------------------------------------------------- */

.sui-dialog-error   .sui-dialog-title { color: #dc3545; }
.sui-dialog-warning .sui-dialog-title { color: #c87800; }
.sui-dialog-success .sui-dialog-title { color: #28a745; }
.sui-dialog-info    .sui-dialog-title { color: var(--subheading-text-color, #555); }

/* -------------------------------------------------------------------------
   Dark mode
   ------------------------------------------------------------------------- */

body.dark-mode .sui-dialog {
    background: var(--panel-background-color, #1e1e2e);
    border-color: var(--splitter-color, #2e2e3e);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

body.dark-mode .sui-dialog-header,
body.dark-mode .sui-dialog-footer {
    border-color: var(--splitter-color, #2e2e3e);
}

body.dark-mode .sui-dialog-body {
    color: var(--default-text-color, #e0e0e0);
}

body.dark-mode .sui-dialog-error   .sui-dialog-title { color: #f87171; }
body.dark-mode .sui-dialog-warning .sui-dialog-title { color: #fbbf24; }
body.dark-mode .sui-dialog-success .sui-dialog-title { color: #4ade80; }

/* =========================================================================
   Scheduled reports dialog
   ========================================================================= */

.sched-reports-dialog {
    width: 560px;
}

.sched-reports-body {
    padding: 0;
}

.sched-reports-table {
    width: 100%;
    border-collapse: collapse;
}

.sched-reports-table tr {
    border-bottom: 1px solid var(--splitter-color, #eee);
}

.sched-reports-table tr:last-child {
    border-bottom: none;
}

.sched-report-name {
    padding: 10px 16px;
    font-size: 13px;
    color: var(--default-text-color, #333);
    word-break: break-all;
}

.sched-report-desc {
    font-size: 12px;
    color: var(--subheading-text-color, #888);
    margin-left: 4px;
}

.sched-report-actions {
    padding: 8px 16px 8px 0;
    white-space: nowrap;
    text-align: right;
    vertical-align: middle;
}

.sched-report-actions .btn {
    margin-left: 6px;
}

body.dark-mode .sched-reports-table tr {
    border-color: var(--splitter-color, #2e2e3e);
}

body.dark-mode .sched-report-name {
    color: var(--default-text-color, #e0e0e0);
}