/* =========================================
   Side Panel Booking Form - Self Contained
   ========================================= */

/* Use a unique namespace to avoid conflicts */
.sp-booking-container {
    padding: 1.5rem;
    font-family: 'Outfit', sans-serif;
    color: #0B4745;
    /* Brand Teal */
    background: #ffffff;
    max-width: 100%;
    margin: 0 auto;
    /* Ensuring container behavior */
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sp-header {
    margin-bottom: 1rem;
    text-align: center;
}

.sp-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #0B4745;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, #0B4745 0%, #D2B68A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.sp-header p {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 300;
}

.sp-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Form Group */
.sp-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}

.sp-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #D2B68A;
    /* Gold Label */
    margin-left: 4px;
}

/* Input Styles */
.sp-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.sp-input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    /* Space for icon */
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    color: #0B4745;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.3s ease;
    outline: none;
}

.sp-input:focus {
    background: #ffffff;
    border-color: #D2B68A;
    /* Gold focus border */
    box-shadow: 0 0 0 3px rgba(210, 182, 138, 0.2);
}

.sp-icon {
    position: absolute;
    left: 14px;
    width: 20px;
    height: 20px;
    color: #64748b;
    transition: color 0.3s ease;
    pointer-events: none;
}

.sp-input:focus+.sp-icon,
.sp-input:focus~.sp-icon {
    color: #D2B68A;
    /* Gold icon on focus */
}

/* Readonly Destination Input Style override */
.sp-input[readonly] {
    background: #f1f5f9;
    color: #475569;
    cursor: default;
    border-color: #cbd5e1;
}

/* Date Row */
.sp-row {
    display: flex;
    gap: 1rem;
}

.sp-col {
    flex: 1;
}

/* Guest Counter Styles */
.sp-counters-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0B4745;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed #e2e8f0;
}

.sp-counter-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: #f8fafc;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
}

.sp-counter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sp-counter-label-group {
    display: flex;
    flex-direction: column;
}

.sp-counter-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: #0B4745;
}

.sp-counter-sub {
    font-size: 0.75rem;
    color: #94a3b8;
}

.sp-counter-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #ffffff;
    padding: 4px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.sp-counter-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    color: #0B4745;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.sp-counter-btn:hover {
    background: #D2B68A;
    color: #ffffff;
}

.sp-counter-value {
    width: 20px;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Submit Buttons Group */
.sp-btn-group {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-top: 1.5rem;
}

.sp-btn-submit {
    flex: 1;
    padding: 16px 8px; /* Slightly reduced horizontal padding */
    background: linear-gradient(135deg, #0B4745 0%, #0d5e5b 100%);
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1rem; /* Slightly smaller for split view */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 10px 20px -5px rgba(11, 71, 69, 0.4);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.sp-btn-whatsapp {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 8px;
    background: #25D366;
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 10px 20px -5px rgba(37, 211, 102, 0.4);
}

.sp-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(11, 71, 69, 0.5);
    background: linear-gradient(135deg, #0B4745 0%, #D2B68A 100%);
}

.sp-btn-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(37, 211, 102, 0.5);
    color: #ffffff;
}

.sp-btn-submit:active {
    transform: translateY(0);
}

/* Result Display (e.g. availability status) */
.sp-result {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    display: none;
    text-align: center;
    font-size: 0.9rem;
}

.sp-result.success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    display: block;
}

.sp-result.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    display: block;
}

/* Side Panel Invoice Modal Override */
.sp-modal {
    z-index: 3000 !important;
    /* Ensure it sits above the side panel (z-index 2001) */
}

/* Ensure the modal content is also accessible */
.sp-modal .invoice-modal-card {
    z-index: 3001;
}

/* Account Required Alert */
.sp-account-alert {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 8px;
    background: rgba(210, 182, 138, 0.1);
    border: 1px solid rgba(210, 182, 138, 0.3);
    color: #0f3d3e;
    font-size: 0.9rem;
    line-height: 1.5;
}

.sp-account-alert svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: #d2b68a;
}

/* Authenticated User Alert (Blue Info) */
.sp-account-alert.header-blue {
    background: rgba(49, 130, 206, 0.1);
    border-color: rgba(49, 130, 206, 0.3);
    color: #2c5282;
}

.sp-account-alert.header-blue svg {
    color: #3182ce;
}

/* Booking Instructions Card */
.sp-instructions-card {
    margin-top: 1rem;
    padding: 1.25rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.sp-instructions-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.sp-instructions-header svg {
    width: 24px;
    height: 24px;
    color: #d2b68a;
    flex-shrink: 0;
}

.sp-instructions-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #0B4745;
    font-family: 'Outfit', sans-serif;
}

.sp-instructions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sp-instruction-item {
    display: flex;
    gap: 0.75rem;
    align-items: start;
}

.sp-instruction-icon {
    width: 32px;
    height: 32px;
    background: rgba(210, 182, 138, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sp-instruction-icon svg {
    width: 18px;
    height: 18px;
}

/* Different colors for each instruction type */
.sp-instruction-item:nth-child(1) .sp-instruction-icon svg {
    color: #d2b68a;
}

.sp-instruction-item:nth-child(2) .sp-instruction-icon svg {
    color: #63b3ed;
}

.sp-instruction-item:nth-child(3) .sp-instruction-icon svg {
    color: #fc8181;
}

.sp-instruction-content {
    flex: 1;
}

.sp-instruction-content h5 {
    margin: 0 0 0.25rem 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0B4745;
    font-family: 'Outfit', sans-serif;
}

.sp-instruction-content p {
    margin: 0;
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.5;
}

.sp-instruction-content strong {
    color: #0B4745;
    font-weight: 600;
}

/* Mobile Overrides (v15 Refinement) */
@media (max-width: 480px) {
    .sp-btn-group {
        gap: 8px;
        margin-top: 1rem;
    }

    .sp-btn-submit,
    .sp-btn-whatsapp {
        padding: 14px 4px !important;
        font-size: 0.85rem !important; /* Smaller to fit text */
        border-radius: 12px !important; /* Reduce curvature to prevent clipping */
        letter-spacing: 0px !important;
    }

    .sp-btn-whatsapp svg {
        width: 14px;
        height: 14px;
    }
}