/* ============================================
   WALK-IN SLIDE PANEL & CHECK-IN/CHECK-OUT
   ເພີ່ມຕໍ່ທ້າຍ style.css
   ============================================ */


/* ---- SLIDE PANEL OVERLAY ---- */

.slide-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    backdrop-filter: blur(3px);
}

.slide-panel-overlay.open {
    opacity: 1;
    visibility: visible;
}


/* ---- SLIDE PANEL BASE ---- */

.slide-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 480px;
    max-width: 95vw;
    background: #fff;
    z-index: 2001;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.18);
}

.slide-panel.open {
    transform: translateX(0);
}


/* ---- PANEL HEADER ---- */

.sp-header {
    padding: 0 28px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e9ecef;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary-color, #007bff) 0%, var(--primary-light, #66b3ff) 100%);
    color: #fff;
}

.sp-header.checkin-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.sp-header.checkout-header {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
}

.sp-header.receipt-header-bar {
    background: linear-gradient(135deg, #6f42c1 0%, #e83e8c 100%);
}

.sp-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.sp-title .sp-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.sp-close {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.sp-close:hover {
    background: rgba(255, 255, 255, 0.35);
}


/* ---- PANEL BODY ---- */

.sp-body {
    flex: 1;
    overflow-y: auto;
    padding: 28px;
    scroll-behavior: smooth;
}


/* ---- PANEL FOOTER ---- */

.sp-footer {
    padding: 18px 28px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 12px;
    flex-shrink: 0;
    background: #f8f9fa;
}

.sp-footer .btn {
    flex: 1;
    padding: 12px 16px;
    font-size: 15px;
    border-radius: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.sp-footer .btn-cancel {
    background: #f1f3f5;
    color: #495057;
}

.sp-footer .btn-cancel:hover {
    background: #e9ecef;
}

.sp-footer .btn-submit {
    background: linear-gradient(135deg, var(--primary-color, #007bff), var(--primary-light, #66b3ff));
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 123, 255, 0.35);
}

.sp-footer .btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.45);
}

.sp-footer .btn-checkin-submit {
    background: linear-gradient(135deg, #28a745, #20c997);
    box-shadow: 0 4px 14px rgba(40, 167, 69, 0.35);
}

.sp-footer .btn-checkin-submit:hover {
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.45);
}

.sp-footer .btn-checkout-submit {
    background: linear-gradient(135deg, #dc3545, #fd7e14);
    box-shadow: 0 4px 14px rgba(220, 53, 69, 0.35);
}

.sp-footer .btn-checkout-submit:hover {
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.45);
}


/* ---- FORM SECTIONS ---- */

.sp-section {
    margin-bottom: 24px;
}

.sp-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-color, #007bff);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 8px;
}


/* ---- FORM FIELDS IN PANEL ---- */

.sp-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.sp-form-row.single {
    grid-template-columns: 1fr;
}

.sp-field {
    margin-bottom: 14px;
}

.sp-field label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sp-field label i {
    color: var(--primary-color, #007bff);
    width: 14px;
}

.sp-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    color: #343a40;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.sp-input:focus {
    outline: none;
    border-color: var(--primary-color, #007bff);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.12);
}

.sp-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

.sp-textarea {
    resize: vertical;
    min-height: 80px;
}


/* ---- ROOM PICKER GRID ---- */

.sp-room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    max-height: 240px;
    overflow-y: auto;
    padding: 4px;
}

.sp-room-card {
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 10px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    position: relative;
}

.sp-room-card:hover {
    border-color: var(--primary-color, #007bff);
    background: #f0f7ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.sp-room-card.selected {
    border-color: var(--primary-color, #007bff);
    background: linear-gradient(135deg, var(--primary-color, #007bff), var(--primary-light, #66b3ff));
    color: #fff;
}

.sp-room-card.selected .sp-room-price,
.sp-room-card.selected .sp-room-type-text {
    color: rgba(255, 255, 255, 0.85);
}

.sp-room-num {
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}

.sp-room-type-text {
    font-size: 10px;
    color: #868e96;
    margin-bottom: 3px;
}

.sp-room-price {
    font-size: 10px;
    font-weight: 600;
    color: var(--primary-color, #007bff);
}

.sp-room-selected-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    background: #28a745;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: #fff;
    display: none;
}

.sp-room-card.selected .sp-room-selected-badge {
    display: flex;
}


/* ---- PRICE SUMMARY BOX ---- */

.sp-price-box {
    background: linear-gradient(135deg, #f8f9ff, #fff);
    border: 1.5px solid #dee2e6;
    border-radius: 12px;
    padding: 18px 20px;
    margin-top: 8px;
}

.sp-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    font-size: 14px;
    color: #495057;
    border-bottom: 1px dashed #e9ecef;
}

.sp-price-row:last-child {
    border-bottom: none;
}

.sp-price-row.total {
    font-size: 17px;
    font-weight: 800;
    color: var(--primary-color, #007bff);
    padding-top: 12px;
    border-top: 2px solid #dee2e6;
    border-bottom: none;
    margin-top: 4px;
}


/* ---- GUEST INFO CARD (check-in / check-out view) ---- */

.sp-guest-info-card {
    background: linear-gradient(135deg, #f0f7ff, #fff);
    border: 1.5px solid #c8e6ff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.sp-guest-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color, #007bff), var(--primary-light, #66b3ff));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    flex-shrink: 0;
}

.sp-guest-details h4 {
    font-size: 17px;
    font-weight: 700;
    color: #212529;
    margin: 0 0 4px;
}

.sp-guest-details p {
    font-size: 13px;
    color: #6c757d;
    margin: 0 0 3px;
    display: flex;
    align-items: center;
    gap: 6px;
}


/* ---- STAY TIMELINE ---- */

.sp-timeline {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px 20px;
    border: 1px solid #e9ecef;
}

.sp-timeline-point {
    text-align: center;
    flex: 1;
}

.sp-timeline-date {
    font-size: 15px;
    font-weight: 700;
    color: #212529;
}

.sp-timeline-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    margin-top: 3px;
}

.sp-timeline-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 4px;
}

.sp-timeline-badge.checkin {
    background: #d4edda;
    color: #155724;
}

.sp-timeline-badge.checkout {
    background: #f8d7da;
    color: #721c24;
}

.sp-timeline-sep {
    flex: 2;
    height: 2px;
    background: linear-gradient(90deg, #28a745, #dc3545);
    border-radius: 2px;
    position: relative;
    margin: 0 12px;
}

.sp-timeline-nights {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 1.5px solid #dee2e6;
    padding: 1px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: #495057;
    white-space: nowrap;
}


/* ---- CHECKOUT RECEIPT PREVIEW ---- */

.sp-receipt-preview {
    background: #fff;
    border: 1.5px solid #dee2e6;
    border-radius: 12px;
    overflow: hidden;
}

.sp-receipt-preview-header {
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
    color: #fff;
    padding: 16px 20px;
    text-align: center;
}

.sp-receipt-preview-header h4 {
    margin: 0 0 4px;
    font-size: 16px;
}

.sp-receipt-preview-header p {
    margin: 0;
    font-size: 12px;
    opacity: 0.85;
}

.sp-receipt-table {
    padding: 16px 20px;
}

.sp-receipt-line {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    font-size: 13px;
    border-bottom: 1px dashed #e9ecef;
    color: #495057;
}

.sp-receipt-line:last-child {
    border-bottom: none;
}

.sp-receipt-total-line {
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    background: linear-gradient(135deg, #f0f7ff, #fff);
    border-top: 2px solid #dee2e6;
    font-size: 17px;
    font-weight: 800;
    color: #007bff;
}


/* ---- STEP INDICATOR ---- */

.sp-steps {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
}

.sp-step {
    flex: 1;
    text-align: center;
    padding: 10px 4px;
    font-size: 12px;
    font-weight: 600;
    color: #adb5bd;
    position: relative;
}

.sp-step::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 60%;
    background: #dee2e6;
}

.sp-step:last-child::after {
    display: none;
}

.sp-step.active {
    color: var(--primary-color, #007bff);
}

.sp-step-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #dee2e6;
    color: #868e96;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    margin: 0 auto 4px;
}

.sp-step.active .sp-step-num {
    background: var(--primary-color, #007bff);
    color: #fff;
}

.sp-step.done .sp-step-num {
    background: #28a745;
    color: #fff;
}


/* ---- NIGHTS PICKER ---- */

.sp-nights-picker {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sp-nights-btn {
    width: 38px;
    height: 38px;
    border: 2px solid var(--primary-color, #007bff);
    border-radius: 8px;
    background: #fff;
    color: var(--primary-color, #007bff);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.sp-nights-btn:hover {
    background: var(--primary-color, #007bff);
    color: #fff;
}

.sp-nights-val {
    font-size: 28px;
    font-weight: 800;
    color: #212529;
    min-width: 40px;
    text-align: center;
}

.sp-nights-label {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}


/* ---- EMPTY STATE ---- */

.sp-empty {
    text-align: center;
    padding: 40px 20px;
    color: #adb5bd;
}

.sp-empty i {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
}

.sp-empty p {
    font-size: 14px;
}


/* ---- QUICK CHECKIN LIST ---- */

.sp-checkin-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sp-checkin-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1.5px solid #e9ecef;
    cursor: pointer;
    transition: all 0.2s;
}

.sp-checkin-item:hover {
    border-color: #28a745;
    background: #f0fff4;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.12);
}

.sp-checkin-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.sp-checkin-item-info {
    flex: 1;
}

.sp-checkin-item-name {
    font-size: 14px;
    font-weight: 700;
    color: #212529;
}

.sp-checkin-item-room {
    font-size: 12px;
    color: #6c757d;
    margin-top: 2px;
}

.sp-checkin-item-arrow {
    color: #adb5bd;
    font-size: 14px;
}


/* ---- CHECKOUT LIST ---- */

.sp-checkout-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1.5px solid #e9ecef;
    cursor: pointer;
    transition: all 0.2s;
}

.sp-checkout-item:hover {
    border-color: #dc3545;
    background: #fff5f5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.12);
}

.sp-checkout-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #dc3545, #fd7e14);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}


/* ---- WALKIN BUTTON IN NAV/HEADER ---- */

.btn-walkin-float {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: linear-gradient(135deg, var(--primary-color, #007bff), var(--primary-light, #66b3ff));
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 6px 24px rgba(0, 123, 255, 0.45);
    z-index: 999;
    transition: all 0.2s;
}

.btn-walkin-float:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.55);
}


/* ---- RESPONSIVE ---- */

@media (max-width: 576px) {
    .slide-panel {
        width: 100vw;
        max-width: 100vw;
    }
    .sp-form-row {
        grid-template-columns: 1fr;
    }
    .sp-room-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}


/* ---- ANIMATIONS ---- */

@keyframes sp-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sp-body>* {
    animation: sp-fade-in 0.3s ease both;
}


/* Receipt in Slide Panel */

.sp-receipt-print-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    transition: all 0.2s;
}

.sp-receipt-print-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}