/* Gravity Forms Custom Styles */
:root {
    --gf-form-gap-y: 4px;
}

.gform_wrapper .gfield {
    margin-top: 0px;
}
.gform-theme--foundation .gform_fields {
    row-gap: 4px!important;
}

.select-list-g legend.gfield_label {
    color: var(--new-green, #0F3F36);
    font-family: Shrikhand;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 90%;
    display: flex;
    margin-bottom: 16px;
}


/* Checkbox List Styling */
.select-list-g .gfield_checkbox {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row !important;
    gap: 10px !important;
    list-style: none;
    padding: 0;
    margin: 0;
}

.select-list-g .gchoice {
    position: relative;
}


/* Hide original checkbox */
.select-list-g .gfield-choice-input {
    display: none !important;
}

.select-list-g .gfield_checkbox .gchoice {
    display: flex;
    padding: 8px 16px;
    justify-content: center;
    align-items: center;
    border-radius: 100px;
    background: var(--new-green, #0F3F36);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0;
    white-space: nowrap;
    min-height: 36px;
    width: auto;
}

.select-list-g .gfield_checkbox .gchoice label {
    color: var(--New-Light, #D8FFB4)!important;
    font-family: Biryani;
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
    line-height: 110%;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

.select-list-g .gfield_checkbox .gchoice:hover {
    background: #1a5a4d;
}

.select-list-g .gfield_checkbox .gchoice:has(.gfield-choice-input:checked) {
    background: var(--Voltbuy2, linear-gradient(92deg, #FF6082 0%, #D5153E 89.03%));
}

.select-list-g .gfield_checkbox .gchoice:has(.gfield-choice-input:checked) label {
    color: var(--New-Light, #D8FFB4)!important;
}

/* Remove default fieldset styles */
.select-list-g.gfield {
    padding: 0;
    margin: 0;
    border: none;
}



/* Required asterisk styling */
.select-list-g .gfield_required {
    color: #FF4D8D;
    margin-left: 0px;
    top: -2px;
    position: relative;
}

/* Focus styles for accessibility - applied to gchoice using :has() */
.select-list-g .gfield_checkbox .gchoice:has(.gfield-choice-input:focus) {
    outline: 2px solid var(--volt-pink, #FF4D8D);
    outline-offset: 2px;
}

/* Responsive adjustments - Target label inside gchoice */
@media (max-width: 768px) {
    .select-list-g .gfield_checkbox .gchoice label {
        font-size: 12px;
    }
     .select-list-g .gfield_checkbox .gchoice {
         padding: 8px 16px;
     }
}

/* General Input Field Styling */
.gform_wrapper input[type="text"],
.gform_wrapper input[type="email"],
.gform_wrapper input[type="tel"],
.gform_wrapper input[type="url"],
.gform_wrapper input[type="number"],
.gform_wrapper input[type="password"],
.gform_wrapper textarea {
    /* Direct Styles */
    border-radius: 12px!important;
    background: var(--white, #FFF)!important;
    color: var(--new-green, #0F3F36)!important;
    font-family: Biryani!important;
    font-size: 14px!important;
    font-style: normal!important;
    font-weight: 300!important;
    line-height: 1.5 !important; /* Adjusted for better vertical centering with fixed height */
    letter-spacing: 0.28px!important;
    display: flex!important; /* Note: flex display on input might not layout inner text */
    height: 48px !important;
    padding: 12px 24px!important;
    align-items: center!important; /* Changed to center align text vertically better */
    /* align-self: stretch!important; */ /* Removed as it might not be needed/applicable here */
    box-sizing: border-box!important;

    /* Explicit Border */
    border-width: 1px !important;
    border-style: solid !important;
    border-color: var(--white, #FFF) !important;

    /* Overriding --gf-local variables */
    --gf-local-appearance: none !important;
    --gf-local-bg-color: var(--white, #FFF) !important;
    --gf-local-height: 48px !important;
    --gf-local-radius: 12px !important;
    --gf-local-border-color: var(--white, #FFF) !important;
    --gf-local-border-width: 1px !important;
    --gf-local-border-style: solid !important;
    --gf-local-border-block-start: var(--gf-local-border-width) var(--gf-local-border-style) var(--gf-local-border-color) !important;
    --gf-local-border-block-end: var(--gf-local-border-width) var(--gf-local-border-style) var(--gf-local-border-color) !important;
    --gf-local-border-inline-start: var(--gf-local-border-width) var(--gf-local-border-style) var(--gf-local-border-color) !important;
    --gf-local-border-inline-end: var(--gf-local-border-width) var(--gf-local-border-style) var(--gf-local-border-color) !important;
    --gf-local-color: var(--new-green, #0F3F36) !important;
    --gf-local-display: flex !important;
    --gf-local-font-family: Biryani !important;
    --gf-local-font-size: 14px !important;
    --gf-local-font-style: normal !important;
    --gf-local-font-weight: 300 !important;
    --gf-local-letter-spacing: 0.28px !important;
    --gf-local-line-height: 1.5 !important; /* Match direct style */
    --gf-local-padding-x: 24px !important;
    --gf-local-padding-y: 12px !important;
    --gf-local-shadow: none !important;
    --gf-local-outline-width: 0 !important;
    --gf-local-outline-color: transparent !important;
    --gf-local-transition: var(--gf-transition-duration, 0.15s) !important; /* Use framework transition */
    --gf-form-gap-y: 6px!important;
}

/* Placeholder Styling */
.gform_wrapper input::placeholder,
.gform_wrapper textarea::placeholder {
     color: rgba(15, 63, 54, 0.7);
     font-weight: 300;
     font-style: normal;
     opacity: 1;
}

/* Focus State */
.gform_wrapper input[type="text"]:focus,
.gform_wrapper input[type="email"]:focus,
.gform_wrapper input[type="tel"]:focus,
.gform_wrapper input[type="url"]:focus,
.gform_wrapper input[type="number"]:focus,
.gform_wrapper input[type="password"]:focus,
.gform_wrapper textarea:focus {
    border-color: var(--new-green, #0F3F36) !important; /* Example focus border */
    --gf-local-border-color: var(--new-green, #0F3F36) !important;
    box-shadow: none !important;
    outline: none !important;
}

/* --- Floating Label Styles --- */

/* Make field container relative */
.gform_wrapper .gfield {
    position: relative;
    margin-top: 20px; /* Add margin to prevent overlap */
}

/* Style the actual label - EXCLUDING .select-list-g fields */
.gform_wrapper .gfield:not(.select-list-g) .gfield_label:not(.gform-field-label--type-inline) { 
    position: absolute;
    left: 24px; /* Match input padding */
    top: 14px;  /* Adjust vertical position (approx halfway in 48px input) */
    font-family: Biryani !important; /* Match input */
    /* Updated initial text styles */
    color: transparent !important; /* Changed from grey to transparent */
    font-size: 12px !important;
    font-style: normal !important;
    font-weight: 500 !important;
    line-height: 120% !important;
    letter-spacing: 0.96px !important;
    pointer-events: none; /* Allow clicks to pass through to input */
    transition: all 0.2s ease-out;
    background: none !important; /* Ensure no background interferes */
    padding: 0 !important; /* Reset initial padding */
    margin: 0 !important; /* Ensure no margin interferes */
    white-space: nowrap; /* Prevent wrapping */
    overflow: hidden; /* Hide overflow */
    text-overflow: ellipsis; /* Add ellipsis */
    max-width: calc(100% - 48px); /* Prevent overlapping input edge */
    z-index: 1; /* Ensure label is above input background */
}

/* Hide asterisk in initial label state */
.gform_wrapper .gfield:not(.select-list-g) .gfield_label:not(.gform-field-label--type-inline) .gfield_required {
    display: none !important;
}

/* Adjust input padding and ensure background is correct */
.gform_wrapper input[type="text"],
.gform_wrapper input[type="email"],
.gform_wrapper input[type="tel"],
.gform_wrapper input[type="url"],
.gform_wrapper input[type="number"],
.gform_wrapper input[type="password"],
.gform_wrapper textarea {
    padding: 8px 24px 6px 24px !important; /* Top padding increased, bottom reduced */
    background-color: var(--white, #FFF) !important; /* Re-ensure background */
    position: relative; /* Needed for z-index stacking */
    z-index: 0;
    --gf-local-padding-y: 18px 6px !important; /* Update variable */
}

/* Adjust textarea specific styles */
.gform_wrapper textarea {
    padding-top: 18px !important;
    padding-bottom: 6px !important;
    line-height: 1.5 !important;
    height: auto !important;
    min-height: 48px;
    /* Ensure flex alignment works better */
    display: block !important; /* Override flex */
    align-items: stretch !important; /* Reset alignment */
}

/* Style for the label when input is focused or has value - EXCLUDING .select-list-g fields */
.gform_wrapper .gfield:not(.select-list-g).gfield--floating-label-active .gfield_label:not(.gform-field-label--type-inline) {
    top: -8px; /* Updated */
    left: 16px; /* Adjusted slightly for padding */
    font-size: 12px !important; /* Updated */
    color: white !important; /* Updated */
    font-weight: 400 !important; /* Kept from previous */
    /* Added background and padding */
    background-color: var(--new-green, #0F3F36) !important; 
    padding: 2px 16px !important; /* Updated - Adjusted var(--8, 16px) */
    border-radius: 12px; /* Added */
    /* Ensure display properties remain */
    display: inline-flex; /* Use inline-flex to size based on content+padding */
    align-items: center;
    /* Remove properties not needed for inline-flex */
    /* white-space: nowrap; */ 
    /* overflow: hidden; */ 
    /* text-overflow: ellipsis; */ 
    /* max-width: calc(100% - 48px); */
}

/* Hide original placeholder text when floating label is active */
.gform_wrapper .gfield:not(.select-list-g).gfield--floating-label-active input::placeholder,
.gform_wrapper .gfield:not(.select-list-g).gfield--floating-label-active textarea::placeholder {
    color: transparent !important;
    opacity: 0 !important;
}

/* Hide required asterisk on floating label - NOW SHOW AND STYLE */
.gform_wrapper .gfield:not(.select-list-g).gfield--floating-label-active .gfield_label .gfield_required {
    display: inline !important; /* Changed from none */
    color: #d8ffb4 !important; /* Updated color */
    margin-left: 0px !important; /* Updated margin */
    /* Reset any conflicting styles if necessary */
    font-size: 12px !important; /* Updated font-size */
    line-height: inherit; /* Keep inherited line-height */
    font-weight: inherit; /* Keep inherited font-weight */
}

/* --- Submit Button Styles --- */
.gform_wrapper .gform_footer input.gform_button {
    background: var(--new-green, #0F3F36) !important;
    border-radius: 48px !important;
    border: none !important;
    padding: 12px 16px 10px 16px !important;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block; 

    /* Typography */
    color: var(--Power-Lime, #ADFF60) !important;
    text-align: center !important;
    font-family: Biryani !important;
    font-size: 14px !important;
    font-style: normal !important;
    font-weight: 700 !important;
    line-height: 120% !important;
    text-transform: uppercase !important;

    /* Override potential default shadows or outlines */
    box-shadow: none !important;
    outline: none !important;
}

/* Optional: Hover state */
.gform_wrapper .gform_footer input.gform_button:hover {
     background: #1a5a4d !important; /* Slightly lighter green example */
     /* Add other hover styles if needed */
}

.gfield_html.fill-form-txt {
    color: var(--new-green, #0F3F36);
    font-family: Shrikhand;
    font-size: 24px;
    font-style: normal;
    font-weight: 400;
    line-height: 90%;
    display: flex;
    margin-bottom: 0px;
}

.gform-field-label.gform-field-label--type-inline.gfield_consent_label {
    font-weight: 300;
    color: var(--new-green);
}

label.gform-field-label.gform-field-label--type-inline.gfield_consent_label a {
    text-decoration: underline;
}
label.gform-field-label.gform-field-label--type-inline.gfield_consent_label a:hover {
    text-decoration: none;
    color: var(--new-green);
}

/* Time Input Floating Label Styles */
.ginput_container_time {
    position: relative;
    margin-bottom: 10px !important;
}

.ginput_container_time input[type="number"] {
    border-radius: 12px !important;
    background: var(--white, #FFF) !important;
    color: var(--new-green, #0F3F36) !important;
    font-family: Biryani !important;
    font-size: 14px !important;
    font-style: normal !important;
    font-weight: 300 !important;
    line-height: 1.5 !important;
    letter-spacing: 0.28px !important;
    height: 48px !important;
    padding: 12px 24px !important;
    border-width: 1px !important;
    border-style: solid !important;
    border-color: var(--white, #FFF) !important;
    box-sizing: border-box !important;
    position: relative;
    z-index: 0;
    width: 100%;
}

.ginput_container_time input[type="number"]:focus {
    border-color: var(--new-green, #0F3F36) !important;
    outline: none !important;
    box-shadow: none !important;
}

.ginput_container_time label.gform-field-label--type-sub {
    position: absolute;
    left: 24px;
    top: 14px;
    font-family: Biryani !important;
    color: rgba(15, 63, 54, 0.7) !important;
    font-size: 14px !important;
    font-style: normal !important;
    font-weight: 300 !important;
    line-height: 120% !important;
    letter-spacing: 0.28px !important;
    pointer-events: none;
    transition: all 0.2s ease-out;
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 1;
}

/* Style for label when input is focused or has value */
.ginput_container_time input[type="number"]:focus ~ label.gform-field-label--type-sub,
.ginput_container_time input[type="number"]:not(:placeholder-shown) ~ label.gform-field-label--type-sub {
    top: -8px;
    left: 16px;
    font-size: 12px !important;
    color: white !important;
    font-weight: 400 !important;
    background-color: var(--new-green, #0F3F36) !important;
    padding: 2px 16px !important;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    z-index: 2;
}

/* Hide placeholder when input has value */
.ginput_container_time input[type="number"]:focus::placeholder,
.ginput_container_time input[type="number"]:not(:placeholder-shown)::placeholder {
    color: transparent !important;
    opacity: 0 !important;
}

/* Style for the colon separator */
.hour_minute_colon {
    padding: 0;
    margin: 0;
    font-size: 18px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 2%;
    font-weight: bold;
    color: var(--new-green, #0F3F36);
}

/* Hide the native spinner buttons on number inputs */
.ginput_container_time input[type="number"]::-webkit-inner-spin-button,
.ginput_container_time input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.ginput_container_time input[type="number"] {
    -moz-appearance: textfield;
}
/*
.gform-theme--foundation .ginput_complex .ginput_container_time {
    inline-size: 50%!important;
}
*/
/* Ensure consistent styling between hour and minute fields */
.gfield_time_hour,
.gfield_time_minute {
    position: relative;
    width: 49%;
}

/* Make sure minute field matches hour field styling */
.gfield_time_minute input[type="number"] {
    width: 49% !important;
    box-sizing: border-box !important;
}

/* Fix specific minute field styling to match hour field */
.gfield_time_minute.ginput_container_time {
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Override any conflicting styles for minute field */
.gform-theme--foundation .ginput_complex .gfield_time_minute.ginput_container_time,
.gform-theme--foundation .ginput_complex .gfield_time_hour.ginput_container_time {
    inline-size: 49%!important;
    width: 49%!important;
}

/* Ensure both time fields have consistent appearance */
.gfield_time_hour input[type="number"],
.gfield_time_minute input[type="number"] {
    min-width: 0 !important;
    width: 100% !important;
    text-align: center;
    padding-left: 10px !important;
    padding-right: 10px !important;
}

/* Fix label positioning for time fields */
.ginput_container_time label.hour_label,
.ginput_container_time label.minute_label {
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    text-align: center;
}

/* Fix label display when focused/filled */
.ginput_container_time input[type="number"]:focus ~ label.gform-field-label--type-sub,
.ginput_container_time input[type="number"]:not(:placeholder-shown) ~ label.gform-field-label--type-sub {
    transform: translateX(0);
    left: 16px;
}

/* Adjust time inputs layout */
.ginput_complex.gform-grid-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 2%;
    align-items: center;
}

.gform-grid-col {
    min-width: 0;
}

/* Center the colon between hour and minute */
.hour_minute_colon {
    padding: 0;
    margin: 0;
    font-size: 18px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 2%;
    font-weight: bold;
    color: var(--new-green, #0F3F36);
}

/* Fine-tune time fields on smaller screens */
@media (max-width: 768px) {
    .ginput_complex.gform-grid-row {
        flex-wrap: nowrap;
        gap: 2%;
    }
    
    .gfield_time_hour input[type="number"],
    .gfield_time_minute input[type="number"] {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }
}