/* Stay Details Page Styles - Compact Modern Design */

/* --- Hero Section --- */
.stay-hero {
    padding-top: 20px;
    padding-bottom: 16px;
    margin-bottom: 0;
}

.stay-hero-inner {
    max-width: 1080px; /* Slightly tighter container */
    margin: 0 auto;
    padding: 0 20px;
}

.stay-hero-title {
    font-size: 1.75rem; /* Reduced from 2.25rem */
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 8px;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.stay-hero-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--text-color);
    font-weight: 500;
}

.stay-hero-meta span {
    display: flex;
    align-items: center;
}

.text-underline {
    text-decoration: underline;
    font-weight: 600;
    cursor: pointer;
}

/* --- Main Layout --- */
.main-layout {
    display: grid;
    grid-template-columns: 2fr 1fr; /* 2:1 ratio is standard and compact enough */
    gap: 40px; /* Reduced from 64px */
    max-width: 1080px;
    margin: 0 auto 60px;
    padding: 0 20px;
    align-items: start;
}

.full-width-gallery {
    grid-column: 1 / -1;
    margin-bottom: 24px; /* Reduced from 32px */
}

.feed {
    min-width: 0;
}

.sidebar {
    position: sticky;
    top: 90px;
    z-index: 10;
}

/* --- Gallery Grid (Compacted) --- */
.spot-image-container {
    border-radius: 12px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.gallery-single {
    width: 100%;
    height: 380px; /* Reduced from 480px */
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-auto-rows: 180px;
    gap: 6px;
    /* height removed to allow dynamic growth */
}

.gallery-item {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: filter 0.2s ease;
}

.gallery-item:hover {
    filter: brightness(0.85);
}

.gallery-main {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    height: 100%;
}

/* --- Content Typography & Spacing --- */
.card {
    background: transparent;
    border: none;
    box-shadow: none;
    margin-bottom: 0;
}

.card-body {
    padding: 0;
}

.stay-overview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 24px; /* Reduced from 32px */
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 24px;
}

.stay-title-large {
    font-size: 1.25rem; /* Reduced from 1.5rem */
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-color);
}

.stay-meta-large {
    font-size: 0.95rem;
    color: var(--text-color);
    opacity: 0.9;
}

.avatar-placeholder {
    background-color: #333;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
}
.avatar-lg { width: 48px; height: 48px; } /* Reduced from 56px */
.avatar-md { width: 40px; height: 40px; }
.avatar-sm { width: 32px; height: 32px; }

.stay-section {
    padding: 24px 0; /* Reduced from 32px */
    border-bottom: 1px solid var(--gray-200);
}

.stay-section:last-child {
    border-bottom: none;
}

.section-title {
    font-size: 1.2rem; /* Reduced from 1.4rem */
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-color);
}

.stay-description {
    font-size: 0.95rem; /* Reduced from 1.05rem */
    line-height: 1.55;
    color: #484848;
}

.stay-description p {
    margin-bottom: 0.75rem;
}

.stay-desc-toggle {
    border: none;
    background: transparent;
    padding: 0;
    margin-top: 6px;
    color: var(--primary-color);
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.95rem;
}

.host-cred-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

.host-cred-name {
    font-weight: 800;
    color: #0f172a;
}

.host-cred-role,
.host-cred-contact {
    font-size: 0.92rem;
    color: #475569;
    font-weight: 600;
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.host-cred-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.host-cred-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #0f172a;
    font-size: 0.85rem;
    font-weight: 800;
}

.host-cred-files {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-top: 14px;
}

.host-cred-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.host-cred-thumb-btn {
    border: none;
    background: transparent;
    padding: 0;
    width: fit-content;
}

.host-cred-thumb-btn:focus {
    outline: none;
}

.host-cred-thumb img {
    width: 140px;
    height: 92px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--gray-200);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.host-cred-thumb span {
    font-size: 0.85rem;
    color: #475569;
    font-weight: 700;
}

.host-cred-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 800;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
}

.host-cred-number {
    min-width: 240px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.host-cred-number-label {
    font-size: 0.85rem;
    color: #475569;
    font-weight: 800;
}

.host-cred-number-value {
    font-weight: 900;
    color: #0f172a;
    letter-spacing: 0.2px;
}

.host-cred-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.host-cred-card {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.host-cred-card-top {
    display: flex;
    gap: 12px;
    align-items: center;
}

.host-cred-card-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    letter-spacing: 0.6px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    flex: 0 0 auto;
}

.host-cred-card-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.host-cred-card-title {
    font-weight: 900;
    color: #0f172a;
    line-height: 1.15;
}

.host-cred-card-status {
    font-size: 0.85rem;
    font-weight: 900;
    padding: 4px 10px;
    border-radius: 999px;
    display: inline-flex;
    width: fit-content;
}

.host-cred-card-status.ok {
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #065f46;
}

.host-cred-card-status.no {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
}

.host-cred-card-sub {
    font-size: 0.9rem;
    color: #475569;
    font-weight: 700;
}

.host-cred-card-action {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 900;
    border-radius: 12px;
    padding: 10px 12px;
    text-decoration: none;
    cursor: pointer;
    width: fit-content;
}

.host-cred-privacy {
    margin-top: 10px;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 700;
}

@media (max-width: 900px) {
    .host-cred-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Amenities (Compact Grid) --- */
.stay-badges-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.stay-badge {
    padding: 6px 12px;
    font-size: 0.9rem;
    color: var(--text-color);
    background: #f7f7f7;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    line-height: 1;
}


.stay-badge::before {
    content: '';
    display: block;
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.7;
}

/* --- Booking Card (Compact) --- */
.booking-card {
    background: white;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    padding: 20px; /* Reduced from 24px */
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.booking-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
}

.booking-price {
    font-size: 1.35rem; /* Reduced from 1.5rem */
    font-weight: 700;
    color: var(--text-color);
}

.booking-inputs {
    border: 1px solid #b0b0b0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

.booking-dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid #b0b0b0;
}

.booking-date-field {
    padding: 8px 10px;
    border-right: 1px solid #b0b0b0;
    position: relative;
}

.booking-date-field:last-child {
    border-right: none;
}

.booking-guests {
    padding: 8px 10px;
    position: relative;
}

.booking-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 2px;
    color: var(--text-color);
}

.booking-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 0.9rem;
    color: var(--text-color);
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.guest-counter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.guest-counter-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #b0b0b0;
    background: white;
    color: #717171;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    transition: all 0.2s ease;
}

.guest-counter-btn svg {
    width: 14px;
    height: 14px;
    display: block;
}

.guest-counter-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: #ebebeb;
    color: #ebebeb;
    background: #f9f9f9;
}

.guest-counter-btn:hover:not(:disabled) {
    border-color: #222;
    color: #222;
    background: #f7f7f7;
}

.guest-count-display {
    font-size: 1rem;
    color: var(--text-color);
    font-weight: 400;
}

.booking-btn {
    width: 100%;
    background: linear-gradient(90deg, #E61E4D 0%, #D32F2F 100%);
    color: white;
    padding: 12px; /* Reduced from 16px */
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.2s ease;
    text-align: center;
    display: block;
    text-decoration: none;
    margin-top: 12px;
}

.booking-btn:hover {
    box-shadow: 0 3px 10px rgba(230, 30, 77, 0.2);
}

.booking-btn:active {
    transform: scale(0.98);
}

.btn-reserve-login {
    background: var(--text-color);
}

.booking-note {
    text-align: center;
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--secondary-color);
}

/* --- Comments (Compact) --- */
.comments-section {
    padding-top: 32px; /* Reduced from 48px */
}

.comment-list {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px; /* Reduced from 40px */
}

.comment-item {
    display: flex;
    gap: 12px;
}

.comment-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.comment-author {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-color);
}

.comment-date {
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-bottom: 4px;
}

.comment-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-color);
}

.comment-media {
    margin-top: 10px;
}

.comment-media img,
.comment-media video {
    display: block;
    width: 100%;
    max-width: 420px;
    max-height: 340px;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    background: #0b1220;
    object-fit: contain;
}

.comment-media img {
    background: #fff;
}

.comment-form-container {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    background: var(--gray-100);
    padding: 16px;
    border-radius: 12px;
}

.comment-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
    font-size: 0.95rem;
}

.comment-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.comment-label-row label {
    margin: 0;
    font-weight: 800;
}

.comment-media-preview {
    margin-top: 10px;
}

.comment-media-preview img,
.comment-media-preview video {
    display: block;
    width: 100%;
    max-width: 420px;
    max-height: 340px;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    background: #0b1220;
    object-fit: contain;
}

.comment-media-preview img {
    background: #fff;
}

.comment-media-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.comment-media-actions {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-media-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--secondary-color);
}

.comment-media-btn:hover {
    color: var(--text-color);
}

.comment-media-btn svg {
    width: 18px;
    height: 18px;
}

.comment-media-filename {
    font-size: 0.9rem;
    color: var(--secondary-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flex-grow {
    flex-grow: 1;
}

.text-right {
    text-align: right;
}

.w-auto {
    width: auto !important;
}

/* --- Modal Styles --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: white;
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transform: translateY(20px);
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.modal-overlay.open .modal-container {
    transform: translateY(0);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid #efefef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    padding: 0;
    line-height: 1;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

/* --- Confirm & Pay Modal Specifics --- */
.confirm-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #efefef;
}

.confirm-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.confirm-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-color);
}

.trip-details-grid {
    display: flex;
    justify-content: space-between;
}

.trip-detail-item {
    margin-bottom: 12px;
}

.trip-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    display: block;
}

.trip-value {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: var(--text-color);
}

.price-row.total {
    font-weight: 700;
    border-top: 1px solid #efefef;
    padding-top: 12px;
    margin-bottom: 0;
    font-size: 1.1rem;
}

.payment-method-select {
    width: 100%;
    padding: 12px;
    border: 1px solid #b0b0b0;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 16px;
}

.payment-details {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #efefef;
    margin-bottom: 16px;
    display: none;
}

.payment-details.visible {
    display: block;
}

.card-input-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.card-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

.btn-confirm {
    width: 100%;
    background: linear-gradient(90deg, #E61E4D 0%, #D32F2F 100%);
    color: white;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .main-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .stay-hero-title {
        font-size: 1.5rem;
    }

    .gallery-grid {
        height: auto;
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    
    .gallery-main {
        grid-column: auto;
        grid-row: auto;
        height: 250px;
    }
    
    .gallery-item:not(.gallery-main) {
        display: none;
    }
    
    .booking-card {
        position: static;
        margin-bottom: 32px;
        order: -1;
    }
    
    .modal-container {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        transform: none;
    }
}
