/* Custom CSS for Exhibition Manager */

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

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

main {
    flex: 1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
}

/* Navbar */
.navbar {
    z-index: 1050; /* Ensures navbar and its dropdowns are above other content like sticky elements */
}

/* Dues Balance Notification */
.dues-notification {
    z-index: 1040; /* Below navbar (1050) but above most other content */
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

/* Cards */
.card {
    border-radius: 0.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Buttons */
.btn {
    border-radius: 0.375rem;
    padding: 0.625rem 1.25rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

/* Forms */
.form-control,
.form-select {
    border-radius: 0.375rem;
    padding: 0.625rem 0.875rem;
    font-size: 1rem;
}

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

/* Labels */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

/* Alerts */
.alert {
    border-radius: 0.5rem;
    border: none;
}

/* Footer */
footer {
    margin-top: auto;
    background-color: var(--light-color);
    padding: 2rem 0;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.25rem;
    }

    h1.display-4 {
        font-size: 2rem;
    }

    .btn-lg {
        padding: 0.625rem 1.25rem;
        font-size: 1rem;
    }

    /* Touch-friendly buttons */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }

    /* Larger form inputs for mobile */
    .form-control,
    .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.75rem 1rem;
    }
}

/* Accessibility */
a:focus,
button:focus,
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

/* Custom Utilities */
.text-primary-emphasis {
    color: #052c65;
}

.bg-primary-subtle {
    background-color: #cfe2ff;
}

/* Image Upload Preview */
.image-preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Status Badges */
.badge {
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

/* Avatar Styles */
.avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-md {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-lg {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--light-color);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.avatar-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    font-size: 1rem;
}

.avatar-initials.avatar-sm {
    font-size: 0.75rem;
}

.avatar-initials.avatar-lg {
    font-size: 2.5rem;
}

.avatar-preview {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Password Toggle */
.password-toggle-wrapper {
    position: relative;
}

.password-toggle-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6c757d;
    font-size: 1.1rem;
    padding: 0.25rem;
    transition: color 0.2s;
    z-index: 10;
    user-select: none;
}

.password-toggle-icon:hover {
    color: var(--primary-color);
}

.password-toggle-wrapper .form-control {
    padding-right: 2.75rem;
}

/* Adjust sticky sidebar position when dues notification is visible */
.dues-notification ~ main .sidebar-sticky {
    top: 6.5rem !important; /* 2rem original top + ~4.5rem notification height */
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    footer,
    .no-print {
        display: none !important;
    }

    .container {
        max-width: 100%;
    }
}
