/* =========================================
   BALI BOOKING FORM - FINAL TWEAKS
   ========================================= */

/* HIDE RADIO CIRCLES */
.bali-date-cards input[type="radio"],
.bali-time-slots input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
    clip: rect(0,0,0,0) !important;
    width: 1px !important;
    height: 1px !important;
}

/* --- FIX GRAVITY FORMS WRAPPER --- */
.bali-date-cards .gchoice,
.bali-time-slots .gchoice {
    margin: 0 !important;
    padding: 0 !important;
}

/* --- 1. DATE CARDS --- */
.bali-date-cards .gfield_radio {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.bali-date-cards .gchoice {
    display: contents !important;
}

.bali-date-cards label {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    background: #fff !important;
    border: 2px solid #E5E7EB !important;
    border-radius: 12px !important;
    padding: 16px 8px !important;
    text-align: center !important;
    cursor: pointer !important;
    height: 90px !important;
    min-width: 0 !important;
    max-width: none !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
}

.bali-date-cards label:hover {
    border-color: #7D8DFF !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(125, 141, 255, 0.15);
}

.bali-date-cards input[type="radio"]:checked + label {
    border-color: #ff9e7a !important;
    background-color: #7D8DFF !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(125, 141, 255, 0.4) !important;
}

/* Text Styling - TODAY/TOMORROW bigger on desktop */
.bali-date-cards .date-main {
    font-size: 26px !important; /* 2x bigger: 13px × 2 */
    font-weight: 800 !important; /* Bolder weight */
    text-transform: uppercase !important;
    color: #888888 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

.bali-date-cards .date-num {
    font-size: 32px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    margin: 4px 0 !important;
    color: #888888 !important;
}

.bali-date-cards .date-day {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #b5bac7 !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
}

.bali-date-cards input[type="radio"]:checked + label .date-main,
.bali-date-cards input[type="radio"]:checked + label .date-num {
    color: #ffffff !important;
}

.bali-date-cards input[type="radio"]:checked + label .date-day {
    color: #ffffff !important;
}

/* --- 2. TIME SLOTS - DESKTOP: Shorter & Wider --- */
.bali-time-slots .gfield_radio {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)) !important; /* Wider: 65px → 80px */
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.bali-time-slots .gchoice {
    display: contents !important;
}

.bali-time-slots label {
    display: block !important;
    background: #fff !important;
    border: 2px solid #E5E7EB !important;
    border-radius: 8px !important;
    padding: 8px 8px !important; /* Shorter: 10px → 8px */
    text-align: center !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #8695ac !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
}

.bali-time-slots label:hover {
    border-color: #7D8DFF !important;
    transform: translateY(-2px);
}

.bali-time-slots input[type="radio"]:checked + label {
    background-color: #7D8DFF !important;
    color: #fff !important;
    border-color: #ff9e7a !important;
}

/* --- MOBILE RULES (Max 768px) --- */
@media (max-width: 768px) {
    .bali-date-cards .gfield_radio {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 5px !important; /* CHANGED: 8px → 5px */
    }
    
    .bali-date-cards label {
        height: 55px !important;
        padding: 12px 6px !important;
    }
    
    /* Mobile: Smaller TODAY/TOMORROW text */
    .bali-date-cards .date-main {
        font-size: 14px !important; /* CHANGED: 16px → 14px */
        font-weight: 800 !important;
    }
    
    .bali-date-cards .date-num {
        font-size: 28px !important;
        margin: 2px 0 !important;
    }
    
    .bali-date-cards .date-day {
        font-size: 10px !important;
    }
    
    /* TIME SLOTS: Keep perfect as-is */
    .bali-time-slots .gfield_radio {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 6px !important;
    }
    
    .bali-time-slots label {
        font-size: 12px !important;
        padding: 8px 4px !important;
    }
}


/* =========================================
   GRAVITY FORMS: COMPACT FIELDS WITH CLASSES
   ========================================= */

/* Compact field spacing */
.bali-compact-field {
    margin-bottom: 16px !important;
    padding: 0 !important;
}

.bali-compact-field .ginput_container {
    margin: 0 !important;
    padding: 0 !important;
}

/* Style all compact field inputs */
.bali-compact-field input[type="text"],
.bali-compact-field input[type="email"],
.bali-compact-field textarea {
    width: 100% !important;
    padding: 14px 16px !important;
    font-size: 15px !important;
    font-family: 'Delight', sans-serif !important;
    font-weight: 400 !important;
    color: #888888 !important;
    background: #ffffff !important;
    border: 2px solid #E5E7EB !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
    outline: none !important;
    margin: 0 !important;
}

/* Textarea specific - 1.5x size */
.bali-compact-field textarea {
    min-height: 65px !important;
    max-height: 120px !important;
    resize: vertical !important;
}

/* Focus state */
.bali-compact-field input[type="text"]:focus,
.bali-compact-field input[type="email"]:focus,
.bali-compact-field textarea:focus {
    border-color: #ff9e7a !important;
    background-color: #FAFBFF !important;
    box-shadow: 0 0 0 3px rgba(125, 141, 255, 0.1) !important;
}

/* Placeholder styling */
.bali-compact-field input::placeholder,
.bali-compact-field textarea::placeholder {
    color: #9CA3AF !important;
    opacity: 1 !important;
    font-weight: 400 !important;
}

/* Validation error state */
.gfield_error.bali-compact-field input,
.gfield_error.bali-compact-field textarea {
    border-color: #EF4444 !important;
    background-color: #FEF2F2 !important;
}

/* Error message */
.bali-compact-field .validation_message {
    color: #EF4444 !important;
    font-size: 13px !important;
    margin-top: 6px !important;
    margin-bottom: 0 !important;
    font-family: 'Delight', sans-serif !important;
}

/* Mobile: Even more compact */
@media (max-width: 768px) {
    .bali-compact-field {
        margin-bottom: 12px !important;
    }
    
    .bali-compact-field input[type="text"],
    .bali-compact-field input[type="email"],
    .bali-compact-field textarea {
        padding: 12px 14px !important;
        font-size: 14px !important;
    }
    
    .bali-compact-field textarea {
        min-height: 60px !important;
        max-height: 100px !important;
    }
}


/* Override Gravity Forms spacing variables */
.gform_wrapper .gform_fields .gfield {
    --gf-label-space-primary: 8px !important;
    --gf-label-space-secondary: 4px !important;
    margin-bottom: 15px !important;
}

/* Tighten up the label spacing specifically */
.gform_wrapper .gfield_label {
    margin-bottom: 8px !important;
}

/* Reduce spacing in input containers */
.gform_wrapper .ginput_container {
    margin-top: 0 !important;
}

/* Overall field spacing */
.gform_wrapper .gform_body .gform_fields {
    grid-row-gap: 15px !important;
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    /* Tighter spacing on mobile */
    .gform_wrapper .gform_fields .gfield {
        --gf-label-space-primary: 4px !important;
        --gf-label-space-secondary: 2px !important;
        margin-bottom: 0px !important;
    }
    
    .gform_wrapper .gfield_label {
        margin-bottom: 4px !important;
    }
    
    .gform_wrapper .gform_body .gform_fields {
        grid-row-gap: 10px !important;
    }
    
    /* Bigger input fields on mobile */
    .gform_wrapper input[type="text"],
    .gform_wrapper input[type="email"],
    .gform_wrapper input[type="tel"],
    .gform_wrapper textarea {
        font-size: 16px !important;
        padding: 12px !important;
        min-height: 48px !important; /* Better tap target */
    }
    
    .gform_wrapper textarea {
        min-height: 100px !important;
    }
}

/* =========================================
   SERVICE SELECTION CARDS (Field ID 1)
   Express vs Next Day - Side by Side
   ========================================= */


/* Hide default radio circles */
#field_1_1 input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
    clip: rect(0,0,0,0) !important;
    width: 1px !important;
    height: 1px !important;
}

/* Remove Gravity Forms default spacing */
#field_1_1 .gchoice {
    margin: 0 !important;
    padding: 0 !important;
}

/* Card layout - ALWAYS side by side (desktop + mobile) */
#field_1_1 .gfield_radio {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 16px !important;
    margin: 0 !important;
    padding: 0 !important;
}

#field_1_1 .gchoice {
    display: contents !important;
}

/* Card styling - DESKTOP */
#field_1_1 label {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px 20px !important;
    border: 2px solid #E5E7EB !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    background: white !important;
    min-height: 70px !important;
    text-align: center !important;
    line-height: 1.4 !important;
}

#field_1_1 label:hover {
    border-color: #7d8dff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(125, 141, 255, 0.15);
}

/* Selected state - SOLID BLUE with white text */
#field_1_1 input[type="radio"]:checked + label {
    border-color: #ff9e7a !important;
    background: #7d8dff !important; /* Solid blue instead of light blue */
    box-shadow: 0 4px 16px rgba(125, 141, 255, 0.4) !important; /* Keep the glow */
}

/* White text when selected */
#field_1_1 input[type="radio"]:checked + label strong {
    color: #ffffff !important; /* White title */
}

#field_1_1 input[type="radio"]:checked + label span {
    color: rgba(255, 255, 255, 0.85) !important; /* Slightly transparent white subtitle */
}


/* Text styling - Main title (EXPRESS / NEXT DAY) */
#field_1_1 label strong {
    display: block !important;
    font-size: 20px !important;
    font-weight: 800 !important;
    color: #888888 !important;
    margin-bottom: 6px !important;
    font-family: 'Delight', sans-serif !important;
    text-transform: uppercase !important;
}

/* Text styling - Subtitle (Same Day Service / 24-28h Turnaround) */
#field_1_1 label span {
    display: block !important;
    font-size: 14px !important;
    font-weight: 300 !important;
    color: #666 !important;
    font-family: 'Delight', sans-serif !important;
}

/* MOBILE - Keep side by side with ONE LINE subtitle */
@media (max-width: 768px) {
    #field_1_1 .gfield_radio {
        grid-template-columns: 1fr 1fr !important; /* Keep 2 columns */
        gap: 8px !important;
    }
    
    #field_1_1 label {
        min-height: 45px !important;
        padding: 10px 5px !important;
    }
    
    #field_1_1 label strong {
        font-size: 16px !important; /* Bigger, bolder */
        font-weight: 800 !important;
        margin-bottom: 4px !important;
    }
    
    #field_1_1 label span {
        font-size: 12px !important; /* Smaller */
        font-weight: 500 !important;
        color: #999 !important; /* Lighter grey */
        white-space: nowrap !important; /* FORCE one line */
        overflow: hidden !important;
        text-overflow: ellipsis !important; /* Add ... if too long */
    }
}

/* =========================================
   FORM SECTION LABELS WITH NUMBERED CIRCLES
   SERVICE, DATE & TIME, PICKUP DETAILS
   ========================================= */

/* Target the three main section labels */
#field_1_1 .gfield_label,  /* SERVICE */
#field_1_10 .gfield_label, /* DATE & TIME */
#field_1_4 .gfield_label   /* PICKUP DETAILS (adjust field ID if needed) */
{
    display: flex !important;
    align-items: center !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #888888 !important;
    margin-bottom: 16px !important;
    font-family: 'Delight', sans-serif !important;
    text-transform: uppercase !important;
}

/* Add numbered circles before labels */
#field_1_1 .gfield_label::before {
    content: "1" !important;
}

#field_1_10 .gfield_label::before {
    content: "2" !important;
}

#field_1_4 .gfield_label::before {
    content: "3" !important;
}

/* Circle styling */
#field_1_1 .gfield_label::before,
#field_1_10 .gfield_label::before,
#field_1_4 .gfield_label::before {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    height: 20px !important;
    background: #ff9e7a !important;
    color: #ffffff !important;
    border-radius: 50% !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    margin-right: 16px !important;
    flex-shrink: 0 !important;
}

/* Mobile styles */
@media (max-width: 768px) {
    #field_1_1 .gfield_label,
    #field_1_10 .gfield_label,
    #field_1_4 .gfield_label {
        font-size: 12px !important;
        margin-bottom: 12px !important;
    }
    
    #field_1_1 .gfield_label::before,
    #field_1_10 .gfield_label::before,
    #field_1_4 .gfield_label::before {
        width: 18px !important;
        height: 18px !important;
        font-size: 14px !important;
        margin-right: 1px !important;
    }
}


/* =========================================
   SUBMIT BUTTON STYLING - BOOK on WhatsApp
   ========================================= */

/* Target the submit button */
.gform_wrapper .gform_footer input[type="submit"],
.gform_wrapper .gform_page_footer input[type="submit"] {
    background: #ff9e7a !important;
    border: none !important;
    color: #ffffff !important;
    font-family: 'Delight', sans-serif !important;
    font-size: 16px !important;
    font-weight: 800 !important; /* Changed to 800 for BOOK emphasis */
    padding: 16px 32px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(255, 158, 122, 0.3) !important;
    text-transform: none !important;
}

/* Hover effect */
.gform_wrapper .gform_footer input[type="submit"]:hover,
.gform_wrapper .gform_page_footer input[type="submit"]:hover {
    background: #ff8a5c !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 158, 122, 0.4) !important;
}

/* Active/pressed state */
.gform_wrapper .gform_footer input[type="submit"]:active,
.gform_wrapper .gform_page_footer input[type="submit"]:active {
    transform: translateY(0);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .gform_wrapper .gform_footer input[type="submit"],
    .gform_wrapper .gform_page_footer input[type="submit"] {
        width: 100% !important;
        padding: 14px 24px !important;
        font-size: 19px !important;
    }
}

/* Force placeholder visibility for email field */
#input_1_5::placeholder {
    content: 'EMAIL for receipt & updates' !important;
    color: #9CA3AF !important;
    opacity: 1 !important;
}

/* Force placeholder visibility for address field */
#input_1_6::placeholder {
    color: #9CA3AF !important;
    opacity: 1 !important;
    font-size: 15px !important;
}

/* =========================================
   TEXT BELOW SUBMIT BUTTON
   "No WhatsApp? We will confirm via email."
   ========================================= */

/* Make footer container stack vertically */
.gform_wrapper .gform_footer {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

/* Add text after the button */
.gform_wrapper .gform_footer::after {
    content: 'No WhatsApp? We will confirm via email.' !important;
    display: block !important;
    width: 100% !important;
    margin-top: 6px !important;
    margin-bottom: 0 !important;
    color: #9c9b9b !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    font-family: 'Delight', sans-serif !important;
    text-align: center !important;
    line-height: 1.4 !important;
}

/* Mobile version - smaller text with tighter spacing */
@media (max-width: 768px) {
    .gform_wrapper .gform_footer {
        padding-bottom: 4px !important;
    }
    
    .gform_wrapper .gform_footer::after {
        font-size: 12px !important;
        text-align: center !important;
        margin-top: 2px !important;
        margin-bottom: 8px !important;
        padding: 0 10px !important;
        line-height: 1.0 !important;
    }
}