/* ========================================
   GUEST SIDE MOBILE RESPONSIVE STYLES
   ======================================== */

/* Profile Dropdown Styles */
.profile-dropdown {
    position: relative;
    display: inline-block;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #007bff;
    color: white;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s;
    text-decoration: none;
}

.profile-trigger:hover {
    background: #0056b3;
}

.profile-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    color: #007bff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.profile-name {
    font-size: 14px;
    font-weight: 500;
}

.dropdown-arrow {
    font-size: 12px;
    transition: transform 0.3s;
}

.profile-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 9999;
}

.profile-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background: #f8f9fa;
}

.dropdown-menu a:first-child {
    border-radius: 8px 8px 0 0;
}

.dropdown-menu a:last-child {
    border-radius: 0 0 8px 8px;
}

/* Login Button Style */
.nav-links .login-btn {
    background: #007bff;
    color: white !important;
    padding: 8px 20px;
    border-radius: 20px;
    transition: background 0.3s;
}

.nav-links .login-btn:hover {
    background: #0056b3;
    color: white !important;
}

/* Booking Card Component for Mobile */
.booking-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #007bff;
}

.booking-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.booking-card-ref {
    font-size: 16px;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 5px;
}

.booking-card-room {
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.booking-card-room-number {
    font-size: 12px;
    color: #666;
}

.booking-card-body {
    margin-bottom: 15px;
}

.booking-card-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.booking-card-row:last-child {
    border-bottom: none;
}

.booking-card-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.booking-card-value {
    font-size: 13px;
    color: #333;
    font-weight: 600;
    text-align: right;
}

.booking-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.booking-card-actions .btn {
    flex: 1;
    text-align: center;
}

/* Payment History Card */
.payment-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 3px solid #28a745;
}

.payment-card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.payment-card-date {
    font-size: 13px;
    color: #666;
}

.payment-card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-card-method {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.payment-card-amount {
    font-size: 16px;
    font-weight: bold;
    color: #007bff;
}

/* Guest Page Specific Mobile Styles */
@media (max-width: 768px) {

    /* CRITICAL: Override main style.css hiding navigation on guest pages */
    body:not(.admin-page) .header nav {
        display: block !important;
    }

    body:not(.admin-page) .nav-links {
        display: flex !important;
    }

    /* Hide tables on mobile, show cards instead */
    .guest-bookings-table {
        display: none;
    }

    .guest-bookings-cards {
        display: block;
    }

    /* Guest Header Navigation */
    .header .nav-links {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 5px;
        align-items: center;
    }

    .header .nav-links li {
        margin-left: 0;
        margin-right: 10px;
    }

    /* Style only direct anchor links, not profile dropdown */
    .header .nav-links li>a:not(.profile-trigger) {
        font-size: 13px;
        padding: 6px 12px;
        background: #007bff;
        color: white;
        border-radius: 5px;
        display: inline-block;
    }

    .header .nav-links li>a:not(.profile-trigger):hover {
        background: #0056b3;
    }

    /* Ensure profile dropdown is always visible */
    .profile-dropdown {
        display: inline-block !important;
    }

    .profile-trigger {
        display: flex !important;
    }

    /* Mobile adjustments for profile dropdown */
    .profile-icon {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .profile-name {
        font-size: 13px;
    }


    /* Guest Dashboard Stats */
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-number {
        font-size: 24px;
    }

    .stat-label {
        font-size: 12px;
    }

    /* Booking Confirmation Page */
    .booking-details-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .payment-summary-row {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 5px;
    }

    /* FOOTER - RESPONSIVE */
    .footer {
        padding: 20px 0;
    }

    .footer .container {
        flex-direction: column !important;
        gap: 15px;
        text-align: center;
    }

    .footer .container>* {
        width: 100%;
    }

    .footer img {
        max-width: 250px !important;
        width: 100% !important;
        height: auto;
    }

    .footer p {
        margin: 0;
        font-size: 14px;
    }

    /* Payment History Table to Cards */
    .payment-history-table {
        display: none;
    }

    .payment-history-cards {
        display: block;
    }

    /* BOOK ROOM PAGE - RESPONSIVE LAYOUT */

    /* Main booking grid - stack on mobile */
    .main-content>.container>div[style*="grid-template-columns: 1fr 400px"] {
        display: block !important;
        grid-template-columns: 1fr !important;
    }

    /* Room card adjustments */
    .room-card {
        margin-bottom: 20px;
    }

    .room-image {
        max-height: 250px;
        object-fit: cover;
    }

    .room-content {
        padding: 15px;
    }

    .room-title {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .room-description {
        font-size: 14px;
        line-height: 1.5;
    }

    .room-features {
        flex-wrap: wrap;
        gap: 8px;
    }

    .feature-tag {
        font-size: 12px;
        padding: 5px 10px;
    }

    /* Booking summary card - full width on mobile */
    .auth-card {
        margin-bottom: 20px;
    }

    /* Form adjustments */
    .auth-form .form-group {
        margin-bottom: 15px;
    }

    .auth-form input,
    .auth-form textarea,
    .auth-form select {
        font-size: 16px;
        /* Prevents zoom on iOS */
    }

    .auth-form label {
        font-size: 14px;
        margin-bottom: 5px;
    }

    .auth-form small {
        font-size: 12px;
    }

    /* Booking summary adjustments */
    .auth-card h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .auth-card p {
        font-size: 14px;
        margin-bottom: 8px;
    }

    /* Search Form */
    .search-form {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    /* Auth Pages */
    .auth-container {
        padding: 10px;
    }

    .auth-card {
        padding: 25px 20px;
    }

    /* Main Content Padding */
    .main-content {
        padding: 20px 0;
    }

    /* Responsive Grid Layouts */
    .info-grid {
        grid-template-columns: 1fr !important;
    }

    /* Room Cards */
    .room-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .room-card {
        margin-bottom: 15px;
    }

    /* Buttons */
    .btn-group {
        flex-direction: column;
        gap: 10px;
    }

    .btn-group .btn {
        width: 100%;
    }

    .btn-full {
        width: 100%;
        padding: 14px;
        font-size: 16px;
    }

    /* Alert boxes */
    .alert {
        font-size: 14px;
        padding: 12px;
        margin-bottom: 15px;
    }

    /* Profile Page */
    .profile-grid {
        grid-template-columns: 1fr !important;
    }

    .account-info-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Desktop: Hide mobile card layouts */
@media (min-width: 769px) {
    .guest-bookings-cards {
        display: none;
    }

    .guest-bookings-table {
        display: block;
    }

    .payment-history-cards {
        display: none;
    }

    .payment-history-table {
        display: block;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .booking-card {
        padding: 15px;
    }

    .booking-card-actions {
        flex-direction: column;
    }

    .booking-card-actions .btn {
        width: 100%;
    }

    .header .logo {
        font-size: 16px;
    }

    .dashboard-title {
        font-size: 20px;
    }

    .stat-number {
        font-size: 20px;
    }

    /* Book room page - smaller spacing */
    .room-card {
        margin-bottom: 15px;
    }

    .auth-card {
        padding: 20px 15px;
    }

    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}