/**
 * Pods Booking Frontend Form Styles
 * Version: 2.0.0 (Updated for List View and Show/Hide)
 */

/* === VARIABLES & GENERAL SETUP === */
:root {
    --pods-primary-color: #a020f0;
    --pods-primary-hover-color: #34495e;
    --pods-accent-color: #3498db;
    --pods-accent-light: #f8f9fa;
    --pods-border-color: #ced4da;
    --pods-text-color: #343a40;
    --pods-text-light: #6c757d;
    --pods-error-color: #e74c3c;
    --pods-success-color: #2ecc71;
    --pods-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --pods-border-radius: 8px;
    --pods-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* --- General Form Container Styles --- */
.pods-booking-form-container {
    font-family: var(--pods-font-family);
    color: var(--pods-text-color);
    max-width: 1024px;
    margin: 3em auto;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: var(--pods-shadow);
    overflow: hidden;
    border: 3px solid var(--pods-primary-color);
    padding: 2.5em;
}

/* === TYPOGRAPHY === */
.pods-booking-form-container h2 {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--pods-primary-color);
    margin: 0 0 1em 0;
    padding-bottom: 0.5em;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 1.5em;
}

.pods-booking-form-container h3 {
    font-size: 20px;
    margin-top: 2em;
    text-transform: uppercase;
    color: var(--pods-primary-color);
    letter-spacing: .5px;
    border-bottom: 0;
    padding-bottom: 0;
}

.pods-booking-form-container p {
    color: var(--pods-text-light);
    line-height: 1.6;
    margin-bottom: 0.8em;
}


/* === FORM ELEMENTS === */
.pods-booking-field {
    margin-bottom: 1.5em;
    display: flex;
    flex-direction: column;
}

.pods-booking-field label {
    font-weight: 600;
    margin-bottom: 0.75em;
    font-size: 20px;
    display: block;
    color: #000000;
}

.pods-booking-field input[type="text"],
.pods-booking-field input[type="date"],
.pods-booking-field input[type="email"],
.pods-booking-field input[type="tel"],
.pods-booking-field input[type="number"],
.pods-booking-field select {
    max-width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--pods-border-color);
    border-radius: var(--pods-border-radius);
    font-size: 19px;
    font-family: var(--pods-font-family);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: #fff;
    box-sizing: border-box;
    color: #4b4343;
}

.pods-booking-field input:focus,
.pods-booking-field select:focus {
    outline: none;
    border-color: var(--pods-accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.pods-booking-field .pods-radio-group label {
    display: inline-flex;
    align-items: center;
    margin-right: 20px;
    font-weight: 500;
    font-size: 1em;
}

.pods-booking-field input[type="radio"],
.pods-booking-field input[type="checkbox"] {
    margin-right: 8px;
    height: 18px;
    width: 18px;
    accent-color: var(--pods-primary-color);
    transform: none;
}

/* === LAYOUT === */
.pods-form-row {
    display: flex;
    gap: 25px;
}

.pods-form-row .pods-booking-field {
    flex: 1;
}

/* === STEP 2 LAYOUT === */
.step-2-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 1em;
}

.main-column {
    flex: 6;
    min-width: 320px;
}

.summary-column {
    flex: 4;
    min-width: 280px;
}

/* === COMPONENT STYLES === */

/* Buttons */
#start-booking-btn,
#book-now-btn,
#apply_promo_btn,
#pay-now-btn {
    padding: 6px 20px;
    font-size: 1.1em;
    font-weight: 700;
    color: #fff;
    background-color: var(--pods-primary-color);
    border: none;
    border-radius: var(--pods-border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: center;
    margin-top: 1em;
}

#start-booking-btn:hover,
#book-now-btn:hover,
#apply_promo_btn:hover,
#pay-now-btn:hover {
    background-color: var(--pods-primary-hover-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

#start-booking-btn:active,
#book-now-btn:active,
#apply_promo_btn:active,
#pay-now-btn:active {
    transform: translateY(1px);
}

#start-booking-btn:disabled,
#book-now-btn:disabled,
#pay-now-btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

#apply_promo_btn {
    font-size: 19px;
    padding: 6px 20px;
    width: auto;
    margin-top: 0;
}

.pods-back-button {
    background: transparent;
    border: none;
    color: var(--pods-accent-color);
    padding: 0;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    margin-bottom: 1.5em;
}

.pods-back-button:hover {
    text-decoration: underline;
}

/* Container Details (POD Image/Info) */
.container-details-wrapper {
    display: flex;
    gap: 25px;
    align-items: center;
    margin-top: 1.5em;
}

.container-details-image {
    flex-shrink: 0;
    width: 164px;
}

.container-details-image img {
    width: 100%;
    height: auto;
    border-radius: var(--pods-border-radius);
    display: block;
}

.container-details-info h4 {
    margin: 0 0 0.5em;
    font-size: 1.2em;
    color: var(--pods-text-color);
}

.container-details-info p {
    margin: 4px 0;
    color: var(--pods-text-light);
}

.container-details-info p strong {
    color: var(--pods-text-color);
}


/* Summary Box */
.summary-box {
    background: var(--pods-accent-light);
    padding: 25px;
    border-radius: var(--pods-border-radius);
    position: sticky;
    top: 40px;
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.summary-box h4 {
    margin-top: 0;
    font-size: 1.2em;
    border-bottom: 2px solid var(--pods-primary-color);
    padding-bottom: 0.5em;
}

.summary-item, .summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.95em;
}

.summary-item span {
    color: var(--pods-text-light);
}

.summary-item strong {
    text-align: right;
    font-weight: 600;
}

.summary-box hr {
    border: 0;
    border-top: 1px solid #dee2e6;
    margin: 20px 0;
}

.summary-total {
    font-size: 18px;
    font-weight: 500;
    color: var(--pods-primary-color);
}

/* Price Breakdown Box */
.price-breakdown-box {
    background: var(--pods-accent-light);
    padding: 20px;
    border-radius: var(--pods-border-radius);
    border: 1px solid var(--pods-border-color);
}

.price-breakdown-box .price-line {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #f1f3f5;
}

.price-breakdown-box .price-line:last-child {
    border-bottom: none;
}

.price-breakdown-box .price-line.total {
    font-size: 18px;
    font-weight: 600;
    color: var(--pods-primary-color);
    border-top: 2px solid #dee2e6;
    margin-top: 10px;
}

/* === STATE STYLES === */
.form-error {
    color: #fff;
    background-color: var(--pods-error-color);
    padding: 1em;
    border-radius: var(--pods-border-radius);
    margin: 1.5em 0;
    text-align: center;
    font-weight: 600;
}

/* Promo Code Messages */
#promo-code-message {
    font-size: 0.9em;
    margin-top: 10px;
    font-weight: bold;
}

#promo-code-message a {
    text-decoration: underline;
}

#promo-code-message.promo-success {
    color: var(--pods-success-color);
}

#promo-code-message.promo-error {
    color: var(--pods-error-color);
}


/* === Modal Styles (Payment Popup) === */
.pods-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.pods-modal-content {
    background: #fff;
    padding: 2.5em;
    border-radius: var(--pods-border-radius);
    width: 100%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.pods-modal-content h3 {
    text-align: center;
    font-size: 1.5em;
    margin-top: 0;
    border-bottom: 0;
    text-transform: none;
    letter-spacing: 0;
}

.pods-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2em;
    line-height: 1;
    cursor: pointer;
    color: #ccc;
    transition: color 0.2s ease;
}

.pods-modal-close:hover {
    color: #333;
}

.payment-modal-summary {
    display: flex;
    justify-content: space-between;
    font-size: 1.2em;
    font-weight: 700;
    padding: 1.2em;
    margin: 1em 0 1.5em 0;
    background-color: var(--pods-accent-light);
    border-radius: var(--pods-border-radius);
}

.payment-modal-summary strong {
    color: var(--pods-primary-color);
}

#pay-now-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.payment-trust-seals {
    text-align: center;
    margin-top: 1.5em;
    font-size: 0.85em;
    color: var(--pods-text-light);
}

.payment-trust-seals span {
    margin: 0 10px;
    display: inline-flex;
    align-items: center;
}

.payment-trust-seals svg {
    height: 1em;
    margin-right: 5px;
}

/* === Styles for the new Google Place Autocomplete Element === */
gmp-place-autocomplete {
    display: block;
}

gmp-place-autocomplete::part(input) {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--pods-border-color);
    border-radius: var(--pods-border-radius);
    font-size: 19px;
    font-family: var(--pods-font-family);
    color: var(--pods-text-color);
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

gmp-place-autocomplete::part(input):focus {
    outline: none;
    border-color: var(--pods-primary-color);
    box-shadow: 0 0 0 3px rgba(160, 32, 240, 0.2);
}


/* --- NEW: Moving Supplies List View Styles --- */

.pods-moving-supplies-list-wrapper {
    margin-top: 1.5em;
    padding: 15px;
    background-color: var(--pods-accent-light);
    border-radius: var(--pods-border-radius);
    border: 1px solid var(--pods-border-color);
}

.pods-moving-supplies-header {
    display: flex;
    padding: 10px 0;
    font-weight: bold;
    border-bottom: 1px solid var(--pods-border-color);
    margin-bottom: 10px;
}
.pods-moving-supplies-header .col-image { width: 60px; flex-shrink: 0; }
.pods-moving-supplies-header .col-name { flex-grow: 2; }
.pods-moving-supplies-header .col-price { width: 80px; flex-shrink: 0; text-align: right; }
.pods-moving-supplies-header .col-qty { width: 120px; flex-shrink: 0; text-align: center; }


.pods-moving-supplies-list {
    /* No specific styles needed here, children will handle layout */
}

.pods-supply-item {
    display: flex; /* Use flexbox for row layout */
    align-items: center; /* Vertically align items in the row */
    padding: 10px 0;
    border-bottom: 1px dashed #e0e0e0; /* Dotted line between items */
    transition: background-color 0.1s ease;
}

.pods-supply-item:last-child {
    border-bottom: none; /* No border for the last item */
}

.pods-supply-item:hover {
    background-color: rgba(255, 255, 255, 0.7); /* Subtle hover effect */
}

.pods-supply-item .supply-image {
    width: 50px; /* Small image size */
    height: 50px;
    flex-shrink: 0; /* Prevent shrinking */
    margin-right: 10px;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pods-supply-item .supply-image img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    object-fit: contain;
}

.pods-supply-item .supply-name {
    flex-grow: 2; /* Allow name to take up available space */
    font-weight: 600;
    color: var(--pods-text-color);
    font-size: 0.95em;
    margin-right: 10px;
}

.pods-supply-item .supply-price-display {
    width: 80px; /* Fixed width for price */
    flex-shrink: 0;
    text-align: right;
    font-weight: 600;
    color: var(--pods-text-color);
    font-size: 0.95em;
    margin-right: 10px;
}

.pods-supply-item .supply-quantity-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px; /* Reduced gap */
    width: 120px; /* Fixed width for controls */
    flex-shrink: 0;
}

.pods-supply-item .supply-quantity-control button {
    background-color: var(--pods-accent-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 25px; /* Smaller buttons */
    height: 25px;
    font-size: 1em; /* Adjusted font size */
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0; /* Remove default padding */
}

.pods-supply-item .supply-quantity-control button:hover {
    background-color: var(--pods-primary-hover-color);
}

.pods-supply-item .supply-quantity-control input[type="number"] {
    width: 40px; /* Adjusted width of input */
    text-align: center;
    -moz-appearance: textfield;
    flex-grow: 0; /* Prevent input from growing too much */
    font-size: 0.9em; /* Smaller font for input */
    padding: 5px;
    height: 25px; /* Match button height */
    line-height: 1; /* Match button height */
}

/* Hide arrows for Chrome, Safari, Edge */
.pods-supply-item .supply-quantity-control input::-webkit-outer-spin-button,
.pods-supply-item .supply-quantity-control input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.pods-selected-supplies-summary {
    margin-top: 20px;
    padding: 15px;
    background-color: #f0f0f0;
    border-radius: var(--pods-border-radius);
    border: 1px dashed #ccc;
    font-size: 0.9em;
    color: var(--pods-text-color);
}

.pods-selected-supplies-summary p {
    margin: 5px 0;
    color: var(--pods-text-color);
}

/* --- Payment Modal specific styles --- */
.payment-modal-summary {
    display: flex;
    justify-content: space-between;
    font-size: 1.2em;
    font-weight: 700;
    padding: 1.2em;
    margin: 1em 0 1.5em 0;
    background-color: var(--pods-accent-light);
    border-radius: var(--pods-border-radius);
}

.payment-modal-summary strong {
    color: var(--pods-primary-color);
}

/* Responsive adjustments for supplies section */
@media (max-width: 768px) {
    .pods-moving-supplies-list-wrapper {
        padding: 10px;
    }
    .pods-moving-supplies-header {
        font-size: 0.9em;
    }
    .pods-supply-item {
        flex-wrap: wrap; /* Allow items to wrap on smaller screens */
        justify-content: space-between;
    }
    .pods-supply-item .supply-image {
        width: 40px;
        height: 40px;
        margin-bottom: 5px; /* Add margin below image if wrapped */
    }
    .pods-supply-item .supply-name {
        flex-basis: calc(100% - 60px); /* Adjust width to fit next to image */
        margin-right: 0;
    }
    .pods-supply-item .supply-price-display {
        width: auto;
        text-align: left;
        order: 3; /* Push price below name/image if wrapped */
        flex-basis: 50%;
    }
    .pods-supply-item .supply-quantity-control {
        order: 4; /* Push quantity below name/image if wrapped */
        width: auto;
        justify-content: flex-end; /* Align controls to the right */
        flex-basis: 50%;
    }
    .pods-moving-supplies-header .col-image { width: 50px; }
    .pods-moving-supplies-header .col-name { flex-grow: 1; }
    .pods-moving-supplies-header .col-price { width: 70px; }
    .pods-moving-supplies-header .col-qty { width: 100px; }
}

@media (max-width: 480px) {
    .pods-moving-supplies-list-wrapper {
        padding: 8px;
    }
    .pods-moving-supplies-header {
        font-size: 0.8em;
    }
    .pods-supply-item {
        padding: 8px 0;
        font-size: 0.9em;
    }
    .pods-supply-item .supply-image {
        width: 35px;
        height: 35px;
    }
    .pods-supply-item .supply-quantity-control {
        gap: 2px;
    }
    .pods-supply-item .supply-quantity-control button {
        width: 20px;
        height: 20px;
        font-size: 0.8em;
    }
    .pods-supply-item .supply-quantity-control input[type="number"] {
        width: 35px;
        font-size: 0.8em;
        height: 20px;
    }
}