/* ═══════════════════════════════════════════════════════
   GUEST MODULE CSS — Premium Marketplace Design
   ═══════════════════════════════════════════════════════ */

/* ── Auth Pages ─────────────────────────────────── */
.guest-auth-page {
    display: flex;
    justify-content: center;
    padding: 40px 16px 60px;
}
.guest-auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 40px 36px;
    box-shadow: 0 20px 60px rgba(15,23,42,.08);
}
.guest-auth-header { text-align: center; margin-bottom: 28px; }
.guest-auth-header h1 { font-size: 1.6rem; margin: 0 0 8px; }
.guest-auth-header p { margin: 0; }

.guest-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 12px 18px;
    border: 1px solid #dadce0;
    border-radius: 12px;
    background: #fff;
    color: #3c4043;
    font-size: .95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, box-shadow .15s;
}
.guest-google-btn:hover {
    background: #f8f9fa;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.guest-auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--muted);
    font-size: .85rem;
}
.guest-auth-divider::before,
.guest-auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.guest-auth-form { display: flex; flex-direction: column; gap: 18px; }
.guest-form-group { display: flex; flex-direction: column; gap: 6px; }
.guest-form-group label { font-size: .88rem; font-weight: 600; color: #1e293b; }

.guest-input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #d1d9e6;
    border-radius: 10px;
    font-size: .95rem;
    color: #1e293b;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.guest-input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.guest-input-error { border-color: #ef4444; }
.guest-textarea { resize: vertical; min-height: 100px; }

.guest-field-error { color: #ef4444; font-size: .82rem; }
.guest-field-hint { font-size: .82rem; }

.guest-form-row { display: flex; align-items: center; gap: 8px; }
.guest-checkbox-label { display: flex; align-items: center; gap: 8px; font-size: .9rem; cursor: pointer; }

.guest-submit-btn { width: 100%; min-height: 46px; font-size: 1rem; border-radius: 12px; }
.guest-terms-note { font-size: .82rem; text-align: center; margin: 0; }
.guest-terms-note a { color: var(--brand); }

.guest-auth-footer { text-align: center; margin-top: 24px; font-size: .92rem; }
.guest-auth-footer a { color: var(--brand); font-weight: 600; text-decoration: none; }
.guest-auth-footer a:hover { text-decoration: underline; }

/* ── Alerts ─────────────────────────────────────── */
.guest-alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: .9rem;
    margin-bottom: 18px;
}
.guest-alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.guest-alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.guest-alert-info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

/* ── Panel Layout ───────────────────────────────── */
.guest-panel-page {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 32px;
    padding: 24px 0;
}
.guest-panel-header { margin-bottom: 28px; }
.guest-panel-header h1 { font-size: 1.5rem; margin: 0 0 6px; display: flex; align-items: center; gap: 10px; }
.guest-panel-header p { margin: 0; }

.guest-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .88rem;
    font-weight: 600;
    color: var(--brand);
    text-decoration: none;
    margin-bottom: 12px;
}
.guest-back-link:hover { text-decoration: underline; }

/* ── Sidebar ────────────────────────────────────── */
.guest-sidebar-nav {
    position: sticky;
    top: 100px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 20px 16px;
    box-shadow: 0 4px 16px rgba(15,23,42,.04);
}
.guest-sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--line);
}
.guest-sidebar-user strong { display: block; font-size: .92rem; line-height: 1.3; }
.guest-sidebar-user span { display: block; font-size: .78rem; }
.guest-sidebar-avatar {
    width: 42px; height: 42px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0;
}
.guest-avatar-initials-sm {
    width: 42px; height: 42px; border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff; font-weight: 700; font-size: 1rem;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.guest-sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: .9rem;
    font-weight: 500;
    color: #334155;
    text-decoration: none;
    transition: background .12s;
    border: none;
    background: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
}
.guest-sidebar-link:hover { background: #f1f5f9; }
.guest-sidebar-link.active { background: #eff6ff; color: var(--brand); font-weight: 600; }
.guest-sidebar-link i { font-size: 1.1rem; width: 20px; text-align: center; }
.guest-sidebar-divider { height: 1px; background: var(--line); margin: 10px 0; }
.guest-sidebar-logout { color: #64748b; }
.guest-sidebar-logout:hover { background: #fef2f2; color: #b91c1c; }

/* ── Profile Public ─────────────────────────────── */
.guest-profile-public { display: flex; justify-content: center; padding: 40px 16px 60px; }
.guest-profile-card {
    width: 100%; max-width: 500px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 40px 36px;
    box-shadow: 0 20px 60px rgba(15,23,42,.08);
    text-align: center;
}
.guest-profile-avatar-wrap { margin-bottom: 20px; }
.guest-profile-avatar {
    width: 96px; height: 96px; border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e2e8f0;
}
.guest-avatar-initials {
    width: 96px; height: 96px; border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff; font-weight: 700; font-size: 2.2rem;
    display: inline-flex; align-items: center; justify-content: center;
}
.guest-profile-name { font-size: 1.5rem; margin: 0 0 8px; }
.guest-profile-meta { color: var(--muted); font-size: .9rem; margin-bottom: 16px; }
.guest-profile-meta i { margin-right: 4px; }
.guest-profile-bio { margin: 18px 0; text-align: left; }
.guest-profile-bio p { margin: 0; color: #334155; line-height: 1.6; }
.guest-profile-edit-link { margin-top: 16px; }

/* ── Edit Profile ───────────────────────────────── */
.guest-edit-form { max-width: 560px; display: flex; flex-direction: column; gap: 22px; }
.guest-edit-avatar-section {
    display: flex; align-items: center; gap: 18px;
    flex-wrap: wrap;
    padding: 18px;
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid var(--line);
}
.guest-edit-avatar-preview .guest-profile-avatar { width: 72px; height: 72px; }
.guest-edit-avatar-preview .guest-avatar-initials { width: 72px; height: 72px; font-size: 1.6rem; }
.guest-edit-avatar-actions { display: flex; flex-direction: column; gap: 6px; }
.guest-hidden-input { display: none; }
.guest-avatar-hint { font-size: .78rem; margin: 2px 0 0; }
.guest-avatar-remove-btn { color: #b91c1c; border-color: #fecaca; }
.guest-avatar-upload-btn { cursor: pointer; }
.guest-inline-form { display: inline; }
.guest-form-actions { display: flex; gap: 12px; flex-wrap: wrap; padding-top: 8px; }

/* ── Favorites ──────────────────────────────────── */
.guest-fav-location-group { margin-bottom: 32px; }
.guest-fav-location-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 1.15rem; margin: 0 0 16px;
    padding-bottom: 10px; border-bottom: 2px solid var(--line);
}
.guest-fav-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 24px; height: 24px; padding: 0 6px;
    border-radius: 999px; background: #eff6ff;
    color: var(--brand); font-size: .78rem; font-weight: 700;
}
.guest-fav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}
.guest-fav-card {
    display: grid;
    grid-template-rows: 180px auto;
    overflow: hidden;
    border-radius: var(--radius);
}
.guest-fav-card-media { display: block; overflow: hidden; }
.guest-fav-card-media img {
    width: 100%; height: 180px;
    object-fit: cover; display: block;
    transition: transform .22s;
}
.guest-fav-card:hover .guest-fav-card-media img { transform: scale(1.04); }
.guest-fav-card-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.guest-fav-card-title {
    font-size: 1rem; font-weight: 700;
    color: #0f172a; text-decoration: none;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.guest-fav-card-title:hover { color: var(--brand); }
.guest-fav-card-attrs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.guest-fav-card-actions { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.guest-fav-remove-btn { color: #ef4444; border-color: #fecaca; }
.guest-fav-remove-btn:hover { background: #fef2f2; }

/* ── Reservations ───────────────────────────────── */
.guest-reservations-list { display: flex; flex-direction: column; gap: 12px; }
.guest-reservation-card {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 0;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
}
.guest-reservation-card-media { overflow: hidden; }
.guest-reservation-card-media img {
    width: 120px; height: 90px;
    object-fit: cover; display: block;
    border-radius: var(--radius) 0 0 var(--radius);
}
.guest-reservation-no-img {
    width: 120px; height: 90px;
    display: flex; align-items: center; justify-content: center;
    background: #f1f5f9; color: #94a3b8; font-size: 1.6rem;
}
.guest-reservation-card-body { padding: 12px 8px; }
.guest-reservation-card-title { display: block; margin-bottom: 2px; font-size: .98rem; }
.guest-reservation-card-dates {
    display: flex; gap: 14px; flex-wrap: wrap;
    margin: 6px 0; font-size: .85rem; color: #475569;
}
.guest-reservation-card-dates i { margin-right: 3px; }
.guest-reservation-card-status { margin: 4px 0; }
.guest-reservation-date { font-size: .82rem; }
.guest-reservation-card-arrow { padding-right: 16px; color: #94a3b8; font-size: 1.2rem; }

/* ── Status Badges ──────────────────────────────── */
.guest-status-badge {
    display: inline-flex; align-items: center; padding: 4px 10px;
    border-radius: 999px; font-size: .78rem; font-weight: 700;
}
.guest-status-sent { background: #eff6ff; color: #1d4ed8; }
.guest-status-accepted { background: #f0fdf4; color: #166534; }
.guest-status-rejected { background: #fef2f2; color: #b91c1c; }
.guest-status-cancelled { background: #fefce8; color: #854d0e; }
.guest-status-completed { background: #f0fdf4; color: #15803d; }

/* ── Reservation Detail ─────────────────────────── */
.guest-reservation-detail { display: flex; flex-direction: column; gap: 20px; }
.guest-reservation-detail-property {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 20px;
    overflow: hidden;
}
.guest-reservation-detail-media img {
    width: 200px; height: 140px;
    object-fit: cover; display: block;
    border-radius: var(--radius);
}
.guest-reservation-detail-info { padding: 14px 14px 14px 0; }
.guest-reservation-detail-info h2 { font-size: 1.15rem; margin: 0 0 4px; }
.guest-reservation-detail-data h3 { font-size: 1.1rem; margin: 0 0 16px; }
.guest-detail-row {
    display: flex; justify-content: space-between;
    align-items: center; padding: 10px 0;
    border-bottom: 1px solid var(--line);
    font-size: .92rem;
}
.guest-detail-row:last-child { border-bottom: none; }
.guest-detail-row-block { flex-direction: column; align-items: flex-start; gap: 6px; }
.guest-detail-label { font-weight: 600; color: #475569; }
.guest-detail-message { margin: 0; line-height: 1.6; color: #334155; }
.guest-reservation-detail-history h3 { font-size: 1.1rem; margin: 0 0 14px; }
.guest-history-timeline { display: flex; flex-direction: column; gap: 8px; }
.guest-history-item { display: flex; align-items: center; gap: 12px; font-size: .88rem; }

/* ── Empty States ───────────────────────────────── */
.guest-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #f8fafc;
    border-radius: 18px;
    border: 1px solid var(--line);
}
.guest-empty-icon { font-size: 3rem; color: #94a3b8; margin-bottom: 16px; }
.guest-empty-state h3 { margin: 0 0 8px; }
.guest-empty-state p { margin: 0 0 20px; }

/* ── Favorite Toggle (property cards & show page) ─ */
.fav-toggle-btn {
    position: absolute;
    top: 10px; right: 10px;
    z-index: 10;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,.9);
    border: none;
    cursor: pointer;
    color: #94a3b8;
    font-size: 1.1rem;
    transition: all .18s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    backdrop-filter: blur(4px);
}
.fav-toggle-btn:hover { background: #fff; transform: scale(1.1); }
.fav-toggle-btn.is-favorite { color: #ef4444; }
.fav-toggle-btn.is-favorite i::before { content: "\f415"; }

/* ── Guest User Menu (header dropdown) ──────────── */
.guest-user-menu {
    position: relative;
    display: inline-flex;
}
.guest-user-trigger {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 14px 6px 6px;
    border: 1px solid #d1d9e6;
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    font-size: .88rem;
    font-weight: 600;
    color: #334155;
    transition: border-color .15s, box-shadow .15s;
}
.guest-user-trigger:hover {
    border-color: #93c5fd;
    box-shadow: 0 2px 8px rgba(37,99,235,.1);
}
.guest-user-trigger-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    object-fit: cover;
}
.guest-user-trigger-initials {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff; font-weight: 700; font-size: .8rem;
    display: flex; align-items: center; justify-content: center;
}
.guest-user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(15,23,42,.14);
    z-index: 1000;
    padding: 8px;
    flex-direction: column;
}
.guest-user-menu.open .guest-user-dropdown { display: flex; }
.guest-user-dropdown a,
.guest-user-dropdown button {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: .88rem;
    color: #334155;
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
}
.guest-user-dropdown a:hover,
.guest-user-dropdown button:hover { background: #f1f5f9; }
.guest-user-dropdown i { width: 18px; text-align: center; }
.guest-user-dropdown-divider { height: 1px; background: #e2e8f0; margin: 4px 0; }

/* ── Mobile Responsive ──────────────────────────── */
@media (max-width: 768px) {
    .guest-panel-page {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .guest-panel-sidebar {
        position: fixed;
        bottom: 0; left: 0; right: 0;
        z-index: 900;
        padding: 0;
    }
    .guest-sidebar-nav {
        position: static;
        display: flex;
        gap: 0;
        padding: 8px 12px;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
        box-shadow: 0 -4px 20px rgba(15,23,42,.1);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .guest-sidebar-user,
    .guest-sidebar-divider { display: none; }
    .guest-sidebar-link {
        flex: 0 0 auto;
        flex-direction: column;
        gap: 3px;
        padding: 8px 12px;
        font-size: .72rem;
        text-align: center;
        white-space: nowrap;
    }
    .guest-sidebar-link i { font-size: 1.2rem; }
    .guest-sidebar-logout { display: none; }
    .guest-panel-content { padding-bottom: 80px; }

    .guest-auth-card { padding: 28px 20px; }
    .guest-profile-card { padding: 28px 20px; }

    .guest-reservation-card {
        grid-template-columns: 90px minmax(0, 1fr) auto;
    }
    .guest-reservation-card-media img { width: 90px; height: 72px; }
    .guest-reservation-detail-property { grid-template-columns: 1fr; }
    .guest-reservation-detail-media img { width: 100%; height: 180px; border-radius: var(--radius); }
    .guest-reservation-detail-info { padding: 0; }
}
