/* UI FIXES FOR UNIQUE ENTERPRISES WEBSITE */

/* ==============================================================================
   1. NAVBAR AND CAROUSEL POSITIONING FIX
   ============================================================================== */

/* Calculate proper navbar height and add buffer */
:root {
    --navbar-height: 70px; /* Actual navbar height */
    --navbar-buffer: 20px; /* Additional spacing buffer */
    --total-navbar-offset: calc(var(--navbar-height) + var(--navbar-buffer));
}

/* Ensure navbar stays fixed at top without any spacing issues */
.navbar {
    height: var(--navbar-height) !important;
    min-height: var(--navbar-height) !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1030 !important;
    margin: 0 !important;
    padding: 0.5rem 0 !important; /* Reduced padding for consistent height */
}

/* Adjust body padding to account for fixed navbar */
body {
    padding-top: var(--total-navbar-offset) !important;
}

/* Fix carousel section positioning */
section.hero-carousel-section {
    margin-top: 0 !important; /* Remove conflicting margin */
    padding-top: 1rem !important; /* Small padding for breathing room */
}

/* Ensure carousel container doesn't overlap */
.carousel {
    margin-top: 0 !important;
    position: relative !important;
    z-index: 1 !important;
}

/* ==============================================================================
   2. TERMS AND CONDITIONS MODAL STYLING
   ============================================================================== */

/* Dark theme modal styling */
.modal-content {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.modal-header {
    background-color: var(--bg-secondary) !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.modal-title {
    color: var(--text-primary) !important;
}

.modal-body {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    background-color: var(--bg-secondary) !important;
    border-top: 1px solid var(--border-color) !important;
}

/* Terms content styling within modal */
.terms-content {
    color: var(--text-primary) !important;
    line-height: 1.6;
}

.terms-content h2,
.terms-content h3,
.terms-content h4 {
    color: var(--text-primary) !important;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.terms-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.terms-content h3 {
    font-size: 1.25rem;
    font-weight: 500;
}

.terms-content p {
    color: var(--text-secondary) !important;
    margin-bottom: 1rem;
}

.terms-content a {
    color: var(--primary-blue) !important;
    text-decoration: none;
}

.terms-content a:hover {
    color: var(--text-accent) !important;
    text-decoration: underline;
}

/* Close button styling */
.btn-close {
    background-color: var(--text-muted);
    opacity: 0.8;
}

.btn-close:hover {
    opacity: 1;
}

/* Modal backdrop */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.7) !important;
}

/* ==============================================================================
   3. LOGOUT CONFIRMATION STYLING
   ============================================================================== */

/* Logout page container */
.logout-container {
    min-height: calc(100vh - var(--total-navbar-offset) - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.logout-card {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 1rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    padding: 2rem;
    text-align: center;
}

.logout-card h2 {
    color: var(--text-primary) !important;
    margin-bottom: 1rem;
    font-weight: 600;
}

.logout-card p {
    color: var(--text-secondary) !important;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.logout-card .user-info {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.logout-card .user-info .user-email {
    color: var(--text-accent) !important;
    font-weight: 500;
    font-size: 1.1rem;
}

.logout-card .user-info .user-name {
    color: var(--text-muted) !important;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Logout button styling */
.logout-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.logout-actions .btn {
    min-width: 120px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 0.5rem;
}

.btn-logout {
    background-color: #dc2626 !important;
    border-color: #dc2626 !important;
    color: white !important;
}

.btn-logout:hover {
    background-color: #b91c1c !important;
    border-color: #b91c1c !important;
    color: white !important;
    transform: translateY(-1px);
}

.btn-cancel {
    background-color: var(--bg-tertiary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

.btn-cancel:hover {
    background-color: var(--bg-hover) !important;
    border-color: var(--primary-blue) !important;
    color: var(--text-accent) !important;
    transform: translateY(-1px);
}

/* ==============================================================================
   4. ENHANCED MODAL ANIMATIONS
   ============================================================================== */

/* Smooth modal animations */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -50px);
}

.modal.show .modal-dialog {
    transform: none;
}

/* Modal scaling animation */
@keyframes modalScale {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-content {
    animation: modalScale 0.3s ease-out;
}

/* ==============================================================================
   5. IMPROVED NAVBAR BRAND SIZING
   ============================================================================== */

/* Ensure navbar brand fits properly in reduced height */
.navbar-brand img {
    height: 35px !important; /* Reduced from 40px */
    width: auto;
    max-width: 150px;
}

/* Adjust navbar nav items for reduced height */
.navbar-nav .nav-link {
    padding: 0.4rem 0.8rem !important; /* Reduced padding */
    font-size: 0.95rem;
}

/* Dropdown adjustments */
.dropdown-menu {
    margin-top: 0.25rem;
}

/* ==============================================================================
   6. RESPONSIVE ADJUSTMENTS
   ============================================================================== */

@media (max-width: 768px) {
    :root {
        --navbar-height: 60px;
        --navbar-buffer: 15px;
    }
    
    .navbar-brand img {
        height: 30px !important;
        max-width: 120px;
    }
    
    .navbar-nav .nav-link {
        padding: 0.6rem 1rem !important;
        font-size: 1rem;
    }
    
    .logout-card {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .logout-actions {
        flex-direction: column;
    }
    
    .logout-actions .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 576px) {
    :root {
        --navbar-height: 55px;
        --navbar-buffer: 10px;
    }
    
    .terms-content h2 {
        font-size: 1.25rem;
    }
    
    .terms-content h3 {
        font-size: 1.1rem;
    }
    
    .modal-body {
        max-height: 60vh;
    }
}

/* ==============================================================================
   7. ACCESSIBILITY IMPROVEMENTS
   ============================================================================== */

/* Focus states for better accessibility */
.btn:focus,
.nav-link:focus,
.modal .btn-close:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .modal-content {
        border-width: 2px !important;
    }
    
    .terms-content h2 {
        border-bottom-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .modal.fade .modal-dialog,
    .modal-content,
    .btn {
        transition: none !important;
        animation: none !important;
    }
}
