/* ══════════════════════════════════════════════════════════════
   R2 Artist Scheduler - Application Styles
   ══════════════════════════════════════════════════════════════ */

.app-title-link {
    text-decoration: none;
    color: inherit;
}

    .app-title-link:hover {
        text-decoration: none;
        color: inherit;
    }

/* ── Reset & Base ──────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    color: #212529;
    background-color: #f8f9fa;
    height: 100%;
}

/* ── Loading Splash ────────────────────────────────────────── */
.loading-splash {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: #f8f9fa;
}

.splash-content {
    text-align: center;
    color: #495057;
}

    .splash-content h2 {
        margin-bottom: 1rem;
        color: #0d6efd;
    }

.spinner {
    width: 40px;
    height: 40px;
    margin: 1rem auto;
    border: 4px solid #dee2e6;
    border-top-color: #0d6efd;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── App Layout ────────────────────────────────────────────── */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    height: 56px;
    background: #0d6efd;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    z-index: 100;
}

    .app-header h1 {
        font-size: 1.25rem;
        font-weight: 600;
        margin: 0;
    }

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    font-size: 0.875rem;
    opacity: 0.9;
}

.btn-logout {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.2s;
}

    .btn-logout:hover {
        background: rgba(255, 255, 255, 0.25);
    }

.app-main {
    flex: 1;
    overflow: hidden;
}

/* ── Scheduler Page ────────────────────────────────────────── */
.scheduler-page {
    height: 100%;
    padding: 0;
}

.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 1.1rem;
    color: #6c757d;
}

/* ── Editor Template ───────────────────────────────────────── */
.editor-table {
    width: 100%;
    border-collapse: collapse;
}

    .editor-table td {
        padding: 0.5rem 0.75rem;
        vertical-align: top;
    }

.editor-label {
    font-weight: 600;
    white-space: nowrap;
    width: 100px;
    color: #495057;
    padding-top: 0.65rem !important;
}

/* ── Login Page ────────────────────────────────────────────── */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
    padding: 1rem;
}

.login-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
}

    .login-card h2 {
        margin: 0 0 0.25rem 0;
        color: #0d6efd;
        font-size: 1.5rem;
    }

.login-subtitle {
    color: #6c757d;
    margin: 0 0 1.5rem 0;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1rem;
}

    .form-group label {
        display: block;
        margin-bottom: 0.35rem;
        font-weight: 600;
        font-size: 0.85rem;
        color: #495057;
    }

.form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: border-color 0.15s;
}

    .form-input:focus {
        border-color: #0d6efd;
        outline: none;
        box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
    }

.btn-login {
    width: 100%;
    padding: 0.6rem;
    background: #0d6efd;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 0.5rem;
}

    .btn-login:hover:not(:disabled) {
        background: #0b5ed7;
    }

    .btn-login:disabled {
        opacity: 0.65;
        cursor: not-allowed;
    }

.alert-error {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
    border-radius: 4px;
    font-size: 0.875rem;
}

/* ── Blazor Error UI ───────────────────────────────────────── */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* ── Syncfusion Timeline Overrides ─────────────────────────── */

/* Ensure the resource column has enough width */
.e-schedule .e-timeline-view .e-resource-left-td {
    width: 180px !important;
}

/* Clean up resource cell text */
.e-schedule .e-resource-cells .e-resource-text {
    font-weight: 600;
    font-size: 0.85rem;
}

/* ── Agenda View Resource Column Wrapping ──────────────────── */
.e-schedule .e-agenda-view .e-resource-column {
    white-space: normal !important;
    word-wrap: break-word !important;
}

.e-schedule .e-agenda-view .e-resource-name {
    color: #212529;
    font-size: 12px;
    overflow: hidden;
    line-height: 16px;
    padding: 8px;
    text-overflow: ellipsis;
}

    .e-schedule .e-agenda-view .e-resource-text {
        white-space: normal !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        line-height: 1.2 !important;
    }

    /* Ensure the resource cell has proper padding and width */
    .e-schedule .e-agenda-view .e-resource-cells {
        max-width: 180px !important;
        padding: 8px !important;
    }
    /* ── Custom Event Template Styles ──────────────────────────── */
    .e-schedule .template-wrap {
        height: 100%;
        white-space: normal;
        padding: 2px 6px;
        overflow: hidden;
    }

        .e-schedule .template-wrap .subject {
            font-size: 13px;
            line-height: 1.3;
            text-overflow: ellipsis;
            overflow: hidden;
        }

    /* ── Custom Tooltip Template Styles ────────────────────────── */
    .e-schedule-event-tooltip .tooltip-wrap {
        padding: 8px 10px;
        min-width: 200px;
    }

    .e-schedule-event-tooltip .tooltip-subject {
        font-size: 14px;
        margin-bottom: 4px;
    }

    .e-schedule-event-tooltip .tooltip-project {
        font-size: 13px;
        margin-bottom: 6px;
        color: #f8f9fa;
    }

    .e-schedule-event-tooltip .tooltip-notes {
        font-size: 12px;
        margin-bottom: 6px;
        color: #f8f9fa;
    }

    .e-schedule-event-tooltip .tooltip-time {
        font-size: 11px;
        color: #f8f9fa;
        margin-top: 6px;
        padding-top: 6px;
        border-top: 1px solid #e0e0e0;
    }
    /* ── Custom Quick Info Template Styles ─────────────────────── */
    .e-schedule .e-quick-popup-wrapper .quick-info-header {
        padding: 12px 16px;
        border-radius: 4px 4px 0 0;
    }

    .e-schedule .e-quick-popup-wrapper .quick-info-title {
        font-size: 15px;
        font-weight: 600;
        letter-spacing: 0.3px;
    }

    .e-schedule .e-quick-popup-wrapper .quick-info-content {
        padding: 12px 16px;
    }

    .e-schedule .e-quick-popup-wrapper .quick-info-project,
    .e-schedule .e-quick-popup-wrapper .quick-info-type,
    .e-schedule .e-quick-popup-wrapper .quick-info-notes,
    .e-schedule .e-quick-popup-wrapper .quick-info-time {
        margin-bottom: 8px;
        font-size: 13px;
        line-height: 1.4;
    }

    .e-schedule .e-quick-popup-wrapper .quick-info-content strong {
        color: #495057;
        margin-right: 4px;
    }

    .e-schedule .e-quick-popup-wrapper .quick-info-field {
        margin-bottom: 12px;
    }

    .e-schedule .e-quick-popup-wrapper .quick-info-field strong {
        display: block;
        margin-bottom: 6px;
    }

    .e-schedule .e-quick-popup-wrapper .quick-info-field .e-input-group {
        width: 100%;
    }
/* ── Hide Tooltip When QuickInfo Is Open ───────────────────── */
/* This ensures tooltips don't overlap with QuickInfo popup */
.e-schedule .e-quick-popup-wrapper.e-popup-open ~ .e-tooltip-wrap,
.e-schedule .e-quick-popup-wrapper.e-popup-open ~ .e-schedule-event-tooltip {
    display: none !important;
    visibility: hidden !important;
}
/* Force hide any visible tooltips when a popup is showing */
body:has(.e-quick-popup-wrapper.e-popup-open) .e-schedule-event-tooltip {
    display: none !important;
}
/* ── Filter Bar Styles ─────────────────────────────────────── */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    flex-wrap: wrap;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .filter-item label {
        font-weight: 600;
        font-size: 0.85rem;
        color: #495057;
        white-space: nowrap;
    }

.filter-spacer {
    flex: 1;
}

.fixed-width-dropdown {
    min-width: 180px;
}

.btn-clear-filters {
    padding: 0.35rem 0.75rem;
    background: #6c757d;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s;
}

    .btn-clear-filters:hover {
        background: #5a6268;
    }

.manage-artists-link {
    padding: 0.35rem 0.75rem;
    background: #0d6efd;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: background 0.2s;
}

    .manage-artists-link:hover {
        background: #0b5ed7;
    }
/* ── Appointment Type Item Styles ──────────────────────────── */
.appointment-type-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.appointment-type-item-selected {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-indicator {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    display: inline-block;
    border: 1px solid rgba(0, 0, 0, 0.1);
}
