/* ============================================================================
   MeetDirector.Online v2 - Core Application Styles
   ============================================================================ */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

/* ============================================================================
   Global Styles
   ============================================================================ */

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

body {
    display: flex;
    flex-direction: column;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ============================================================================
   Loading Spinner
   ============================================================================ */

.spinner {
    width: 50px;
    height: 50px;
    margin: 50px auto;
    animation: rotate 2s linear infinite;
}

.spinner .path {
    stroke: var(--primary-color);
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* ============================================================================
   Layout
   ============================================================================ */

.login-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.login-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-layout .footer {
    margin-top: auto;
}

main {
    flex: 1;
}

/* ============================================================================
   Navigation
   ============================================================================ */

.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.3rem;
    transition: opacity 0.3s ease;
}

.navbar-brand:hover {
    opacity: 0.8;
}

.dropdown-menu {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: none;
}

/* ============================================================================
   Cards
   ============================================================================ */

.card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-weight: 600;
}

.card-header.bg-primary,
.card-header.bg-success,
.card-header.bg-danger,
.card-header.bg-warning,
.card-header.bg-info {
    color: white;
}

/* ============================================================================
   Forms
   ============================================================================ */

.form-control,
.form-select {
    border: 1px solid #dee2e6;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #212529;
}

.invalid-feedback {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--danger-color);
}

/* ============================================================================
   Buttons
   ============================================================================ */

.btn {
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0b5ed7;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

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

/* ============================================================================
   Tables
   ============================================================================ */

.table {
    margin-bottom: 0;
}

.table thead {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #212529;
}

.table thead th {
    border-color: #dee2e6;
    padding: 0.75rem;
}

.table tbody tr {
    border-color: #dee2e6;
}

.table tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.02);
}

.table-responsive {
    border-radius: 0.375rem;
}

/* ============================================================================
   Alerts
   ============================================================================ */

.alert {
    border: none;
    border-radius: 0.375rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

/* ============================================================================
   Badges
   ============================================================================ */

.badge {
    padding: 0.375rem 0.625rem;
    font-weight: 500;
    font-size: 0.8rem;
}

/* ============================================================================
   Page Header
   ============================================================================ */

.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.page-header h1 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.page-header .subtitle {
    color: #6c757d;
    font-size: 0.95rem;
}

/* ============================================================================
   Badges & Status
   ============================================================================ */

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ============================================================================
   Timeline
   ============================================================================ */

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 2rem;
    height: calc(100% + 0.5rem);
    width: 2px;
    background-color: #dee2e6;
}

.timeline-marker {
    position: absolute;
    left: -1.75rem;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    top: 0.25rem;
    border: 2px solid white;
}

.timeline-content {
    padding: 0.5rem 0;
}

.timeline-content h6 {
    margin-bottom: 0.25rem;
    font-weight: 600;
}

/* ============================================================================
   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;
}
/* ============================================================================
   Footer
   ============================================================================ */

.footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    margin-top: auto;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* ============================================================================
   Utilities
   ============================================================================ */

.min-vh-100 {
    min-height: 100vh;
}

.text-muted {
    color: #6c757d;
}

.bg-light {
    background-color: #f8f9fa;
}

.border-top {
    border-top: 1px solid #dee2e6;
}

.shadow {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.shadow-sm {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ============================================================================
   Responsive
   ============================================================================ */

@media (max-width: 768px) {
    .navbar-collapse {
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .container-lg {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .btn-group {
        display: flex;
    }

    .btn-group .btn {
        flex: 1;
    }
}

/* ============================================================================
   Print Styles
   ============================================================================ */

@media print {
    .navbar,
    .footer,
    .btn-group,
    .card-footer {
        display: none;
    }

    body {
        background-color: white;
    }

    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}

/* ============================================================================
   Dark Mode (Optional)
   ============================================================================ */

@media (prefers-color-scheme: dark) {
    :root {
        --dark-bg: #1a1a1a;
        --dark-text: #e0e0e0;
    }

    /* Can be enabled if dark mode is desired */
}
