/* Loco Homestay - Modern Booking Modal & VietQR Payment CSS */

.loco-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.loco-modal-backdrop.is-active {
    opacity: 1;
    visibility: visible;
}

.loco-modal-dialog {
    background: #ffffff;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow-y: auto;
    transform: translateY(20px) scale(0.96);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.loco-modal-backdrop.is-active .loco-modal-dialog {
    transform: translateY(0) scale(1);
}

.loco-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid #f1f5f9;
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 10;
}

.loco-modal-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.loco-modal-close {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: #64748b;
    transition: all 0.15s ease;
}

.loco-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.loco-modal-body {
    padding: 22px;
}

/* Room Snapshot Card inside Modal */
.loco-room-snapshot {
    display: flex;
    gap: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 20px;
    align-items: center;
}

.loco-room-snapshot img {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.loco-room-snapshot-info h4 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
}

.loco-room-snapshot-info .price-tag {
    font-size: 14px;
    font-weight: 700;
    color: #e11d48;
}

.loco-room-snapshot-info .capacity-tag {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

/* Form Controls */
.loco-form-group {
    margin-bottom: 16px;
}

.loco-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
}

.loco-form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #ffffff;
    color: #0f172a;
}

.loco-form-control:focus {
    outline: none;
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.loco-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Price Calculation Summary Box */
.loco-price-summary {
    background: #f1f5f9;
    border-radius: 14px;
    padding: 14px 18px;
    margin: 20px 0;
}

.loco-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #475569;
    margin-bottom: 6px;
}

.loco-summary-row.total-row {
    border-top: 1px dashed #cbd5e1;
    padding-top: 8px;
    margin-top: 8px;
    margin-bottom: 0;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
}

.loco-summary-row.total-row .total-amount {
    color: #e11d48;
    font-size: 17px;
}

/* Modal Action Buttons */
.loco-btn-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.loco-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
    transition: all 0.2s ease;
}

.loco-btn-primary:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
}

.loco-btn-airbnb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background: #ffffff;
    color: #FF385C;
    border: 1.5px solid #FF385C;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.loco-btn-airbnb:hover {
    background: #FFF8F9;
    transform: translateY(-1px);
}

/* VietQR Payment View */
.loco-qr-view {
    text-align: center;
    display: none;
}

.loco-qr-view.is-active {
    display: block;
}

.loco-qr-box {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
    display: inline-block;
    margin: 12px 0 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.loco-qr-img {
    max-width: 230px;
    height: auto;
    border-radius: 10px;
    display: block;
    margin: 0 auto;
}

.loco-qr-details {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px;
    text-align: left;
    font-size: 13px;
    margin-top: 14px;
}

.loco-qr-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
}

.loco-qr-detail-row:last-child {
    border-bottom: none;
}

.loco-copy-btn {
    background: #f1f5f9;
    border: none;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    margin-left: 6px;
}

.loco-copy-btn:hover {
    background: #e2e8f0;
}

/* Polling Pulse Status */
.loco-payment-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: #fef3c7;
    color: #92400e;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    margin-top: 8px;
}

.loco-pulse-dot {
    width: 8px;
    height: 8px;
    background: #f59e0b;
    border-radius: 50%;
    animation: locoPulseDot 1.5s infinite;
}

@keyframes locoPulseDot {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* Success State View */
.loco-success-view {
    text-align: center;
    padding: 20px 10px;
    display: none;
}

.loco-success-view.is-active {
    display: block;
}

.loco-success-icon {
    width: 64px;
    height: 64px;
    background: #dcfce7;
    color: #16a34a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 16px;
}

/* Flatpickr Calendar Styling overrides */
.flatpickr-calendar {
    border-radius: 16px !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
    border: 1px solid #e2e8f0 !important;
}

.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange {
    background: #10b981 !important;
    border-color: #10b981 !important;
}

.flatpickr-day.inRange {
    background: #d1fae5 !important;
    border-color: #d1fae5 !important;
    color: #065f46 !important;
}

.flatpickr-day.flatpickr-disabled, .flatpickr-day.flatpickr-disabled:hover {
    color: #cbd5e1 !important;
    background: #f8fafc !important;
    text-decoration: line-through !important;
    cursor: not-allowed !important;
}

@media (max-width: 640px) {
    .loco-form-grid {
        grid-template-columns: 1fr;
    }
    .loco-modal-dialog {
        max-height: 95vh;
        border-radius: 16px;
    }
}
