/* CSS Isolation / Encapsulation */
#wptb-plugin-container.wptb-iso {
    all: initial;
    /* Reset inherited styles */
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    /* Modern Font */
    color: #333;
    line-height: 1.5;
    box-sizing: border-box;
    display: block;
    width: 100%;
}

#wptb-plugin-container.wptb-iso * {
    box-sizing: border-box;
}

/* Variables (Scoped) */
#wptb-plugin-container.wptb-iso {
    --wptb-primary: #FF8C00;
    /* Vibrant Orange */
    --wptb-primary-hover: #E07B00;
    --wptb-dark: #1a1a1a;
    --wptb-light: #ffffff;
    --wptb-grey: #f4f4f4;
    --wptb-border: #e0e0e0;
    --wptb-radius: 8px;
    --wptb-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Main Container */
#wptb-plugin-container .booking-form {
    background: var(--wptb-light);
    border-radius: var(--wptb-radius);
    box-shadow: var(--wptb-shadow);
    padding: 30px;
    margin: 20px 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Step 1: Horizontal Layout (Desktop) */
#wptb-plugin-container #wptb-search-form {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 15px !important;
    align-items: flex-end !important;
    width: 100% !important;
    /* Align inputs with button */
}

#wptb-plugin-container .floating-label {
    flex: 1 !important;
    min-width: 150px !important;
    position: relative !important;
}

/* Input Styling - Luxury Feel */
#wptb-plugin-container input[type="text"],
#wptb-plugin-container input[type="date"],
#wptb-plugin-container input[type="time"],
#wptb-plugin-container input[type="email"],
#wptb-plugin-container input[type="tel"],
#wptb-plugin-container input[type="number"],
#wptb-plugin-container textarea {
    width: 100% !important;
    padding: 15px 15px 5px !important;
    /* More padding top for floating label effect */
    border: 1px solid var(--wptb-border) !important;
    border-radius: var(--wptb-radius) !important;
    background: var(--wptb-grey) !important;
    font-size: 14px !important;
    font-family: inherit;
    transition: all 0.3s ease;
    height: 55px !important;
    /* Fixed height for uniformity */
    color: #333 !important;
    margin: 0 !important;
    /* Reset margin */
}

#wptb-plugin-container input:focus,
#wptb-plugin-container textarea:focus {
    background: #fff;
    border-color: var(--wptb-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.1);
}

/* Label Styling */
#wptb-plugin-container .floating-label label,
#wptb-plugin-container .contact-form label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-bottom: 4px;
    font-weight: 600;
    display: block;
}

/* Specific fix for floating label structure in Step 1 if needed, 
   but cleaner to just have label above input for robustness */
#wptb-plugin-container .floating-label label {
    position: absolute;
    top: 5px;
    left: 15px;
    z-index: 10;
    pointer-events: none;
    font-size: 10px;
    color: #666;
}

/* Button Styling - Orange & Bold */
#wptb-plugin-container button {
    background: var(--wptb-primary);
    color: #fff;
    border: none;
    padding: 0 30px;
    height: 55px;
    border-radius: var(--wptb-radius);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    font-size: 14px;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    min-width: 120px;
    flex: 0 0 auto;
}

#wptb-plugin-container button:hover {
    background-color: var(--wptb-primary-hover) !important;
    background: var(--wptb-primary-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 140, 0, 0.3);
}

#wptb-plugin-container button:disabled {
    background: #ccc;
    box-shadow: none;
    transform: none;
    cursor: not-allowed;
}

/* --- BENTO LAYOUT (Step 2) --- */

#wptb-plugin-container .contact-container.wptb-bento-grid {
    display: grid !important;
    grid-template-columns: 350px 1fr;
    /* Fixed sidebar, fluid form */
    gap: 30px !important;
    margin-top: 40px !important;
}

/* Common Card Style */
#wptb-plugin-container .wptb-card {
    background: #fff !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08) !important;
    padding: 35px !important;
    height: fit-content !important;
    border: 1px solid rgba(0, 0, 0, 0.03) !important;
    transition: transform 0.3s ease !important;
}

#wptb-plugin-container .wptb-card:hover {
    transform: translateY(-5px);
}

/* Sidebar Customization */
#wptb-plugin-container .contact-summary {
    border-right: none !important;
    /* Reset old style */
    position: sticky;
    top: 20px;
}

#wptb-plugin-container .summary-item {
    margin-bottom: 12px;
}

#wptb-plugin-container .summary-item .label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}

#wptb-plugin-container .summary-item .value {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--wptb-dark);
}

#wptb-plugin-container .summary-grid {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

#wptb-plugin-container .price-section {
    margin: 20px 0;
    text-align: center;
}

#wptb-plugin-container .total-price {
    font-size: 32px !important;
    font-weight: 800;
    color: var(--wptb-primary);
}

/* Form Grid System */
#wptb-plugin-container .form-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

#wptb-plugin-container .full-width {
    width: 100%;
}

#wptb-plugin-container .half-width {
    width: calc(50% - 10px);
}

#wptb-plugin-container .third-width {
    width: calc(33.333% - 14px);
}

/* Form Elements Polishing */
#wptb-plugin-container h2 {
    font-size: 20px !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 30px !important;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

#wptb-plugin-container h2::after {
    display: none !important;
}

#wptb-plugin-container label {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #444 !important;
    margin-bottom: 8px !important;
    display: block !important;
}

#wptb-plugin-container .luggage-group {
    display: flex;
    gap: 20px;
}

#wptb-plugin-container .secondary-btn {
    background: transparent !important;
    color: #888 !important;
    border: 1px solid #ddd !important;
    height: 45px !important;
}

#wptb-plugin-container .secondary-btn:hover {
    background: #f9f9f9 !important;
    color: #333 !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Progress Bar */
#wptb-plugin-container .progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

#wptb-plugin-container .progress-bar::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    width: 100%;
    height: 2px;
    background: #eee;
    z-index: 0;
}

#wptb-plugin-container .step {
    width: 40px;
    height: 40px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #aaa;
    position: relative;
    z-index: 1;
    transition: all 0.3s;
}

#wptb-plugin-container .step.active,
#wptb-plugin-container .step.completed {
    border-color: var(--wptb-primary);
    background: var(--wptb-primary);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(255, 140, 0, 0.2);
}

#wptb-plugin-container .progress-bar p {
    position: absolute;
    top: 45px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #888;
    margin: 0;
}

/* Success */
#wptb-plugin-container .booking-success {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: var(--wptb-radius);
    box-shadow: var(--wptb-shadow);
}

#wptb-plugin-container .icon-check {
    font-size: 60px;
    color: var(--wptb-primary);
    margin-bottom: 20px;
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    #wptb-plugin-container #wptb-search-form {
        flex-direction: column !important;
        gap: 15px !important;
        align-items: stretch !important;
        /* Fixes the right alignment issue */
    }

    #wptb-plugin-container .floating-label {
        width: 100% !important;
        flex: none !important;
        /* Disable flex-grow behavior in column */
    }

    #wptb-plugin-container button {
        width: 100% !important;
        margin-top: 10px !important;
    }

    #wptb-plugin-container .contact-container {
        flex-direction: column !important;
    }

    #wptb-plugin-container .contact-summary {
        border-right: none !important;
        border-bottom: 1px solid var(--wptb-border) !important;
        padding-right: 0 !important;
        padding-bottom: 30px !important;
    }

    #wptb-plugin-container .luggage-group {
        flex-direction: column !important;
        gap: 10px !important;
    }
}

/* Responsive - Mobile Bento */
@media (max-width: 900px) {
    #wptb-plugin-container .contact-container.wptb-bento-grid {
        grid-template-columns: 1fr !important;
        /* Stack them */
    }

    #wptb-plugin-container .half-width,
    #wptb-plugin-container .third-width {
        width: 100% !important;
        /* Stack inputs */
    }

    #wptb-plugin-container .contact-summary {
        order: -1;
        /* Summary first? Or last. Usually summary first is good context. */
    }
}

/* Google Maps Autocomplete Styling (Luxury) */
.pac-container {
    background-color: #fff;
    border-radius: 0 0 8px 8px;
    border: 1px solid #ddd;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    margin-top: 5px;
    z-index: 9999 !important;
    /* Force on top */
}

.pac-item {
    padding: 10px 15px;
    border-top: 1px solid #f0f0f0;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    line-height: 1.4;
}

.pac-item:hover {
    background-color: #fafafa;
}

.pac-item:first-child {
    border-top: none;
}

.pac-item-query {
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.pac-icon {
    display: none;
}