/* Navigation Fixes for Better Layout */
@media (max-width: 1200px) {
    .nav-menu {
        gap: var(--space-sm);
    }
    
    .nav-link {
        font-size: 14px;
        padding: var(--space-xs) 0;
    }
}

@media (max-width: 1024px) {
    .navbar .container {
        padding: var(--space-xs) var(--space-sm);
    }
    
    .nav-brand h2 {
        font-size: 18px;
    }
    
    .nav-menu {
        gap: var(--space-xs);
    }
    
    .nav-link {
        font-size: 13px;
        padding: 4px 0;
    }
    
    .nav-actions .btn-primary,
    .nav-actions .btn-secondary {
        padding: 6px var(--space-sm);
        font-size: 12px;
        height: 36px;
    }
}

@media (max-width: 900px) {
    .nav-menu {
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        flex-wrap: nowrap;
    }
    
    .nav-menu::-webkit-scrollbar {
        display: none;
    }
    
    .nav-link {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    .navbar .container {
        padding: var(--space-sm);
    }
    
    .nav-toggle {
        display: block;
    }
    
    /* Hide menu and actions by default on mobile */
    .nav-menu,
    .nav-actions {
        display: none;
    }
    
    /* Mobile dropdown menu */
    .nav-menu.active {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: var(--space-md);
        box-shadow: var(--shadow-lg);
        border-radius: 0 0 var(--radius) var(--radius);
        z-index: 1000;
        animation: slideDown 0.3s ease-out;
    }
    
    .nav-menu.active .nav-link {
        padding: var(--space-sm) 0;
        border-bottom: 1px solid var(--neutral-200);
        font-size: 16px;
        text-align: center;
    }
    
    .nav-menu.active .nav-link:last-child {
        border-bottom: none;
    }
    
    /* Mobile actions (login/register) */
    .nav-actions.active {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: row;
        justify-content: center;
        padding: var(--space-sm) var(--space-md);
        box-shadow: var(--shadow-lg);
        border-radius: 0 0 var(--radius) var(--radius);
        z-index: 1000;
        gap: var(--space-sm);
        animation: slideDown 0.3s ease-out;
    }
}

/* Mobile Text Layout Fixes */
@media (max-width: 600px) {
    .navbar .container {
        padding: 8px 12px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
        overflow: hidden;
    }
    
    .nav-brand {
        flex-shrink: 1;
        min-width: 0;
        margin-right: 8px;
    }
    
    .nav-brand h2 {
        font-size: 16px;
        margin: 0;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .nav-menu {
        gap: 8px;
        padding: 0 4px;
        flex-shrink: 1;
        min-width: 0;
        display: flex;
        overflow: hidden;
    }
    
    .nav-link {
        font-size: 12px;
        padding: 6px 4px;
        margin: 0 2px;
        border-radius: 4px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .nav-actions {
        gap: 6px;
        margin-left: 8px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
    }
    
    .nav-actions .btn-primary,
    .nav-actions .btn-secondary {
        padding: 6px 10px;
        font-size: 11px;
        height: 32px;
        border-radius: 6px;
        white-space: nowrap;
        min-width: fit-content;
        flex-shrink: 0;
    }
    
    .nav-actions .btn-secondary {
        margin-right: 4px;
    }
}

/* Mobile dropdown animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Auth Modal Styles */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.auth-modal.active {
    animation: fadeIn 0.3s ease;
}

.auth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.auth-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.auth-modal.active .auth-modal-content {
    transform: scale(1);
}

.auth-modal-header {
    padding: 24px 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--neutral-200);
    margin-bottom: 24px;
    padding-bottom: 16px;
}

.auth-modal-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--neutral-900);
}

.auth-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--neutral-500);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.auth-modal-close:hover {
    background: var(--neutral-100);
    color: var(--neutral-700);
}

.auth-modal-body {
    padding: 0 24px 24px;
}

/* Auth Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--neutral-700);
}

.form-group input {
    padding: 12px 16px;
    border: 1px solid var(--neutral-300);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(34, 87, 73, 0.1);
}

.form-group input::placeholder {
    color: var(--neutral-500);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    color: var(--neutral-600);
    cursor: pointer;
    user-select: none;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    accent-color: var(--primary-500);
    cursor: pointer;
    margin-top: 2px;
}

.checkbox-label .terms-text {
    display: inline;
    line-height: 1.5;
}

.checkbox-label .terms-link {
    color: var(--primary-500);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.checkbox-label .terms-link:hover {
    text-decoration: underline;
}

.forgot-password {
    font-size: 14px;
    color: var(--primary-500);
    text-decoration: none;
    font-weight: 500;
}

.forgot-password:hover {
    text-decoration: underline;
}

.auth-submit-btn {
    padding: 14px 24px;
    background: var(--primary-500);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.auth-submit-btn:hover {
    background: var(--primary-600);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 87, 73, 0.3);
}

.auth-submit-btn:disabled {
    background: var(--neutral-400);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auth-switch {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid var(--neutral-200);
    margin-top: 8px;
    font-size: 14px;
    color: var(--neutral-600);
}

.auth-switch span {
    margin-right: 4px;
}

.switch-auth {
    color: var(--primary-500);
    text-decoration: none;
    font-weight: 500;
}

.switch-auth:hover {
    text-decoration: underline;
}

/* User Menu Styles */
.user-menu {
    position: relative;
    display: inline-block;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--neutral-100);
    border: 1px solid var(--neutral-300);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--neutral-700);
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-menu-btn:hover {
    background: var(--neutral-200);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid var(--neutral-200);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    margin-top: 4px;
}

.user-menu.active .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--neutral-700);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.user-dropdown-item:hover {
    background: var(--neutral-50);
    color: var(--primary-500);
}

.user-dropdown-item.logout-btn {
    color: var(--error);
}

.user-dropdown-item.logout-btn:hover {
    background: rgba(239, 68, 68, 0.05);
    color: var(--error);
}

.user-dropdown-divider {
    height: 1px;
    background: var(--neutral-200);
    margin: 4px 0;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 10001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 400px;
}

.notification.show {
    transform: translateX(0);
}

.notification.removing {
    transform: translateX(100%);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
}

.notification-success {
    border-left: 4px solid var(--success);
}

.notification-success .notification-content i {
    color: var(--success);
}

.notification-error {
    border-left: 4px solid var(--error);
}

.notification-error .notification-content i {
    color: var(--error);
}

.notification-warning {
    border-left: 4px solid var(--warning);
}

.notification-warning .notification-content i {
    color: var(--warning);
}

.notification-info {
    border-left: 4px solid var(--info);
}

.notification-info .notification-content i {
    color: var(--info);
}

.notification-content span {
    flex: 1;
    font-size: 14px;
    color: var(--neutral-700);
}

.notification-close {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--neutral-500);
    cursor: pointer;
    padding: 2px;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.notification-close:hover {
    background: var(--neutral-100);
    color: var(--neutral-700);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Mobile Responsive for Auth Modal */
@media (max-width: 768px) {
    .auth-modal-content {
        width: 95%;
        margin: 20px;
        max-height: calc(100vh - 40px);
    }
    
    .auth-modal-header {
        padding: 20px 20px 0;
        margin-bottom: 20px;
    }
    
    .auth-modal-body {
        padding: 0 20px 20px;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Dropdown menu overlay for better UX */
@media (max-width: 768px) {
    .navbar::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    
    .navbar.menu-open::after {
        opacity: 1;
        visibility: visible;
    }
}

/* Ensure hamburger menu is always visible on mobile */
@media (max-width: 768px) {
    .nav-toggle {
        display: block !important;
        cursor: pointer;
        padding: 8px;
        border-radius: 6px;
        transition: var(--transition);
        background: none;
        border: none;
        color: var(--neutral-500);
        font-size: 24px;
    }
    
    .nav-toggle:hover {
        background: var(--neutral-100);
        color: var(--primary-500);
    }
    
    /* Make sure brand logo doesn't get too small */
    .nav-brand h2 {
        min-width: 120px;
        text-align: left;
    }
}

@media (max-width: 480px) {
    .navbar .container {
        padding: 6px 8px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
        overflow: hidden;
        gap: 4px;
    }
    
    .nav-brand {
        flex-shrink: 1;
        min-width: 0;
        margin-right: 4px;
    }
    
    .nav-brand h2 {
        font-size: 14px;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 80px;
    }
    
    .nav-toggle {
        font-size: 20px;
        padding: 4px;
        border-radius: 4px;
        transition: var(--transition);
    }
    
    .nav-toggle:hover {
        background: var(--neutral-50);
    }
    
    /* Dropdown menu styling for very small screens */
    .nav-menu.active {
        padding: var(--space-sm);
        max-height: 60vh;
        overflow-y: auto;
    }
    
    .nav-menu.active .nav-link {
        padding: var(--space-sm) 0;
        font-size: 16px;
        border-bottom: 1px solid var(--neutral-200);
        text-align: center;
        margin: 0 var(--space-sm);
    }
    
    .nav-actions.active {
        padding: var(--space-xs) var(--space-md) var(--space-sm);
        gap: var(--space-sm);
    }
    
    .nav-actions.active .btn-primary,
    .nav-actions.active .btn-secondary {
        padding: 8px 16px;
        font-size: 14px;
        height: 36px;
        border-radius: 8px;
        flex: 1;
        max-width: 120px;
    }
}

/* ============================================
   PROFILE MODAL STYLES
   ============================================ */

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    border-radius: 12px;
    color: white;
    margin-bottom: 24px;
}

.profile-avatar {
    font-size: 64px;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.profile-info h4 {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: 600;
}

.profile-info p {
    margin: 0 0 4px 0;
    opacity: 0.9;
    font-size: 14px;
}

.profile-info small {
    opacity: 0.7;
    font-size: 12px;
}

.profile-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--neutral-200);
}

.profile-tab {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--neutral-600);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.profile-tab:hover {
    color: var(--primary-500);
    background: var(--neutral-50);
}

.profile-tab.active {
    color: var(--primary-500);
    border-bottom-color: var(--primary-500);
}

.profile-content {
    position: relative;
}

.profile-tab-content {
    display: none;
}

.profile-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.profile-form .form-group {
    margin-bottom: 20px;
}

.profile-form .form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--neutral-700);
    font-size: 14px;
    font-weight: 500;
}

.profile-form .form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--neutral-300);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.profile-form .form-group input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(34, 87, 73, 0.1);
}

/* ============================================
   RESERVATIONS MODAL STYLES
   ============================================ */

.reservations-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.reservation-card {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: white;
    border: 1px solid var(--neutral-200);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.reservation-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.reservation-image {
    position: relative;
    width: 200px;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.reservation-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reservation-status {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    background: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.reservation-status.upcoming {
    color: var(--primary-500);
}

.reservation-status.completed {
    color: var(--success-500);
}

.reservation-status.cancelled {
    color: var(--error-500);
}

.reservation-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reservation-details h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--neutral-900);
}

.reservation-location {
    margin: 0;
    color: var(--neutral-600);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.reservation-dates {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.reservation-date {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--neutral-700);
}

.reservation-date i {
    color: var(--primary-500);
}

.reservation-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 8px;
    border-top: 1px solid var(--neutral-200);
    font-size: 14px;
    color: var(--neutral-600);
}

.reservation-info i {
    margin-right: 4px;
}

.reservation-price {
    margin-left: auto;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-500);
}

.reservation-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

/* ============================================
   FAVORITES MODAL STYLES
   ============================================ */

.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.favorite-card {
    background: white;
    border: 1px solid var(--neutral-200);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.favorite-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.favorite-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.favorite-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.favorite-card:hover .favorite-image img {
    transform: scale(1.05);
}

.favorite-remove {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: 50%;
    color: var(--error-500);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.favorite-remove:hover {
    background: var(--error-500);
    color: white;
    transform: scale(1.1);
}

.favorite-content {
    padding: 20px;
}

.favorite-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--neutral-900);
}

.favorite-location {
    margin: 0 0 12px 0;
    color: var(--neutral-600);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.favorite-features {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--neutral-200);
    font-size: 13px;
    color: var(--neutral-600);
}

.favorite-features span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.favorite-features i {
    color: var(--primary-500);
}

.favorite-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.favorite-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-500);
}

.favorite-price small {
    font-size: 14px;
    font-weight: 400;
    color: var(--neutral-600);
}

/* ============================================
   EMPTY STATE STYLES
   ============================================ */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--neutral-600);
}

.empty-state i {
    font-size: 80px;
    color: var(--neutral-300);
    margin-bottom: 24px;
}

.empty-state h3 {
    margin: 0 0 12px 0;
    font-size: 24px;
    color: var(--neutral-700);
}

.empty-state p {
    margin: 0 0 24px 0;
    font-size: 16px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   RESPONSIVE STYLES FOR NEW MODALS
   ============================================ */

@media (max-width: 768px) {
    .auth-modal-content {
        max-width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-tabs {
        flex-direction: column;
    }
    
    .profile-tab {
        border-bottom: 1px solid var(--neutral-200);
        border-left: 3px solid transparent;
    }
    
    .profile-tab.active {
        border-bottom-color: var(--neutral-200);
        border-left-color: var(--primary-500);
    }
    
    .reservation-card {
        flex-direction: column;
    }
    
    .reservation-image {
        width: 100%;
        height: 200px;
    }
    
    .reservation-actions {
        flex-direction: column;
    }
    
    .reservation-actions button {
        width: 100%;
    }
    
    .favorites-grid {
        grid-template-columns: 1fr;
    }
}

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