/*
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.0.0
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* ==============================================
   GS Floating Form — Modern Gravity Forms Style
   Add "gs-floating-form" to any GF form CSS class
   ============================================== */

/* --- Grid layout --- */
.gs-floating-form .gform_fields {
    display: grid !important;
    grid-template-columns: repeat(12, 1fr) !important;
    gap: 1rem !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

.gs-floating-form .gfield {
    grid-column: span 12;
    position: relative;
    margin: 0 !important;
    padding: 0 !important;
}

/* --- Field widths (GF 2.5+ layout classes) --- */
.gs-floating-form .gfield--width-half {
    grid-column: span 6;
}

.gs-floating-form .gfield--width-third {
    grid-column: span 4;
}

.gs-floating-form .gfield--width-quarter {
    grid-column: span 3;
}

/* --- Section titles --- */
.gs-floating-form .gsection {
    grid-column: span 12;
    border: none !important;
    border-top: 1px solid #e2e8f0 !important;
    padding: 1.5rem 0 0 !important;
    margin-top: 0.5rem !important;
}

.gs-floating-form .gsection:first-child {
    border-top: none !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.gs-floating-form .gsection .gsection_title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    padding: 0;
    border: none;
    line-height: 1.4;
}

/* --- Reset GF body/footer spacing --- */
.gs-floating-form .gform_body {
    padding: 0 !important;
    margin: 0 !important;
}

.gs-floating-form .gform_footer {
    padding: 0.5rem 0 0 !important;
    margin: 0 !important;
}

/* --- Input base styles --- */
.gs-floating-form input:not([type="submit"]):not([type="button"]):not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="hidden"]),
.gs-floating-form select,
.gs-floating-form textarea {
    width: 100% !important;
    padding: 1.25rem 1rem 0.5rem !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.5rem !important;
    background: #fff !important;
    color: #1e293b !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    outline: none !important;
    font-family: inherit !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    box-sizing: border-box !important;
}

/* Focus state */
.gs-floating-form input:not([type="submit"]):not([type="button"]):not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="hidden"]):focus,
.gs-floating-form select:focus,
.gs-floating-form textarea:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* --- Floating labels --- */
.gs-floating-form .gfield:not(.gsection):not(.gfield--type-radio):not(.gfield--type-checkbox):not(.gfield--type-consent):not(.gfield--type-html):not(.gfield--type-fileupload):not(.gfield--type-captcha):not(.gfield--type-singleproduct):not(.gfield--type-product):not(.gfield--type-total):not(.gfield--type-option):not(.gfield--type-quantity):not(.gfield--type-shipping):not(.gs-upsell):not(.gs-payment-methods):not(.gs-order-overview):not(.gs-terms):not(.gs-trust-badges) > .gfield_label {
    position: absolute !important;
    top: 50% !important;
    left: 1rem !important;
    transform: translateY(-50%) !important;
    font-size: 1rem !important;
    color: #94a3b8 !important;
    pointer-events: none !important;
    transition: all 0.2s ease !important;
    z-index: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    background: transparent !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: calc(100% - 2rem) !important;
}

/* Float label UP — on focus */
.gs-floating-form .gfield:not(.gsection):not(.gfield--type-radio):not(.gfield--type-checkbox):not(.gfield--type-consent):not(.gfield--type-singleproduct):not(.gfield--type-product):not(.gfield--type-total):not(.gs-upsell):not(.gs-payment-methods):not(.gs-order-overview):focus-within > .gfield_label {
    top: 0.625rem !important;
    transform: translateY(0) !important;
    font-size: 0.75rem !important;
    color: #64748b !important;
}

/* Float label UP — when field has value (JS adds .gf-filled) */
.gs-floating-form .gfield.gf-filled:not(.gsection):not(.gfield--type-radio):not(.gfield--type-checkbox):not(.gfield--type-consent):not(.gfield--type-singleproduct):not(.gfield--type-product):not(.gfield--type-total):not(.gs-upsell):not(.gs-payment-methods):not(.gs-order-overview) > .gfield_label {
    top: 0.625rem !important;
    transform: translateY(0) !important;
    font-size: 0.75rem !important;
    color: #64748b !important;
}

/* Select fields — label always floated (always shows text) */
.gs-floating-form .gfield--type-select > .gfield_label {
    top: 0.625rem !important;
    transform: translateY(0) !important;
    font-size: 0.75rem !important;
    color: #64748b !important;
}

/* Textarea — adjust vertical position */
.gs-floating-form .gfield--type-textarea > .gfield_label {
    top: 1.125rem !important;
    transform: translateY(0) !important;
}

.gs-floating-form .gfield--type-textarea:focus-within > .gfield_label,
.gs-floating-form .gfield--type-textarea.gf-filled > .gfield_label {
    top: 0.5rem !important;
}

/* Required asterisk — subtle color */
.gs-floating-form .gfield_required {
    color: inherit !important;
}

/* --- Select custom arrow --- */
.gs-floating-form .ginput_container_select {
    position: relative;
}

.gs-floating-form .ginput_container_select::after {
    content: '';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #94a3b8;
    pointer-events: none;
}

/* --- Error states --- */
.gs-floating-form .gfield_error input:not([type="submit"]):not([type="button"]):not([type="radio"]):not([type="checkbox"]),
.gs-floating-form .gfield_error select,
.gs-floating-form .gfield_error textarea {
    border-color: #ef4444 !important;
}

.gs-floating-form .gfield_error input:not([type="submit"]):not([type="button"]):not([type="radio"]):not([type="checkbox"]):focus,
.gs-floating-form .gfield_error select:focus,
.gs-floating-form .gfield_error textarea:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.gs-floating-form .gfield_error > .gfield_label {
    color: #ef4444 !important;
}

.gs-floating-form .validation_message {
    color: #ef4444 !important;
    font-size: 0.875rem !important;
    margin-top: 0.375rem !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    font-weight: 400 !important;
}

.gs-floating-form .gform_validation_errors {
    border: 1px solid #ef4444 !important;
    border-radius: 0.5rem !important;
    background: #fef2f2 !important;
    padding: 1rem !important;
    margin-bottom: 1.5rem !important;
}

/* --- Radio, Checkbox, Consent — normal labels (not floating) --- */
.gs-floating-form .gfield--type-radio > .gfield_label,
.gs-floating-form .gfield--type-checkbox > .gfield_label,
.gs-floating-form .gfield--type-consent > .gfield_label {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: #374151 !important;
    pointer-events: auto !important;
    margin-bottom: 0.5rem !important;
    display: block !important;
    max-width: none !important;
    white-space: normal !important;
    overflow: visible !important;
}

.gs-floating-form .gfield--type-consent .ginput_container {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.gs-floating-form .gfield--type-consent input[type="checkbox"] {
    -webkit-appearance: auto !important;
    appearance: auto !important;
    width: auto !important;
    padding: 0 !important;
    margin-top: 0.25rem;
}

/* --- Submit button (green) --- */
.gs-floating-form .gform_button {
    width: 100% !important;
    padding: 1rem 2rem !important;
    font-size: 1.0625rem !important;
    font-weight: 600 !important;
    color: #fff !important;
    background: #22c55e !important;
    border: none !important;
    border-radius: 0.5rem !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
    font-family: inherit !important;
    line-height: 1.5 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.gs-floating-form .gform_button:hover {
    background: #16a34a !important;
}

/* --- Hide GF field descriptions (keep validation messages, keep in special fields) --- */
.gs-floating-form .gfield:not(.gs-upsell):not(.gs-order-overview):not(.gs-trust-badges):not(.gfield--type-html) .gfield_description:not(.validation_message) {
    display: none;
}

/* --- Hide GF default choice label for complex fields --- */
.gs-floating-form .ginput_complex label {
    display: none !important;
}

/* --- Complex field grid (name, address sub-fields) --- */
.gs-floating-form .ginput_complex {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
}

.gs-floating-form .ginput_complex .ginput_full {
    grid-column: span 12;
}

.gs-floating-form .ginput_complex .ginput_left,
.gs-floating-form .ginput_complex .ginput_right {
    grid-column: span 6;
}

/* ==============================================
   PAYMENT METHOD CARDS
   Add "gs-payment-methods" CSS class to a GF Radio field.
   Use GF Image Choices for icons, or plain text labels.
   ============================================== */

.gs-floating-form .gs-payment-methods {
    grid-column: span 12;
}

.gs-floating-form .gs-payment-methods > .gfield_label {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: #374151 !important;
    pointer-events: auto !important;
    margin-bottom: 0.75rem !important;
    display: none !important;
    max-width: none !important;
    white-space: normal !important;
    overflow: visible !important;
}

.gs-floating-form .gs-payment-methods .gfield_radio {
    display: flex !important;
    gap: 0.75rem !important;
    flex-wrap: wrap !important;
}

.gs-floating-form .gs-payment-methods .gchoice {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    position: relative !important;
}

.gs-floating-form .gs-payment-methods .gchoice input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
}

.gs-floating-form .gs-payment-methods .gchoice label {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.375rem !important;
    padding: 0.875rem 0.5rem !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 0.5rem !important;
    cursor: pointer !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    background: #fff !important;
    text-align: center !important;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    color: #374151 !important;
    min-height: 4rem !important;
    position: relative !important;
}

.gs-floating-form .gs-payment-methods .gchoice label:hover {
    border-color: #94a3b8 !important;
}

/* Selected payment method */
.gs-floating-form .gs-payment-methods .gchoice input[type="radio"]:checked + label {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 1px #3b82f6 !important;
}

/* Radio indicator dot on selected card */
.gs-floating-form .gs-payment-methods .gchoice input[type="radio"]:checked + label::before {
    content: '' !important;
    position: absolute !important;
    top: 0.5rem !important;
    left: 0.5rem !important;
    width: 1rem !important;
    height: 1rem !important;
    border-radius: 50% !important;
    border: 2px solid #3b82f6 !important;
    background: radial-gradient(circle, #3b82f6 40%, transparent 41%) !important;
}

/* Image choice icons */
.gs-floating-form .gs-payment-methods .gchoice label img {
    max-height: 1.5rem !important;
    width: auto !important;
    object-fit: contain !important;
}


/* ==============================================
   UPSELL PRODUCT CARDS
   Add "gs-upsell" CSS class to a GF HTML field.

   HTML structure inside the GF HTML field:
   <div class="gs-upsell-card" data-product-field="input_X">
     <div class="gs-upsell-image">
       <img src="..." alt="...">
     </div>
     <div class="gs-upsell-content">
       <h4>Title <span class="gs-badge">-24%</span></h4>
       <p>Description text...</p>
       <div class="gs-upsell-footer">
         <div class="gs-upsell-price">
           <span class="gs-price-original">&euro; 17,00</span>
           <span class="gs-price-sale">&euro; 7,00</span>
         </div>
         <button type="button" class="gs-upsell-add">Toevoegen</button>
       </div>
     </div>
   </div>

   The data-product-field should reference a hidden GF
   Single Product field's input name (e.g. "input_5").
   ============================================== */

.gs-floating-form .gs-upsell {
    grid-column: span 12;
}

.gs-floating-form .gs-upsell > .gfield_label {
    display: none !important;
}

.gs-upsell-card {
    display: flex;
    gap: 0.875rem;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gs-upsell-card + .gs-upsell-card {
    margin-top: 0.75rem;
}

.gs-upsell-card.gs-upsell-added {
    border-color: #22c55e;
    box-shadow: 0 0 0 1px #22c55e;
}

.gs-upsell-image {
    flex: 0 0 5.5rem;
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 0.5rem;
    overflow: hidden;
}

.gs-upsell-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gs-upsell-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.gs-upsell-content h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.gs-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    background: #dcfce7;
    color: #16a34a;
    font-size: 0.6875rem;
    font-weight: 700;
    white-space: nowrap;
}

.gs-upsell-content p {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gs-upsell-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.25rem;
}

.gs-upsell-price {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.gs-price-original {
    text-decoration: line-through;
    color: #94a3b8;
    font-size: 0.8125rem;
}

.gs-price-sale {
    font-weight: 700;
    color: #22c55e;
    font-size: 0.9375rem;
}

.gs-upsell-add {
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #fff;
    background: #22c55e;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1.5;
}

.gs-upsell-add:hover {
    background: #16a34a;
}

.gs-upsell-add.gs-added {
    background: #ef4444;
}

.gs-upsell-add.gs-added::after {
    content: none;
}


/* ==============================================
   ORDER OVERVIEW
   Add "gs-order-overview" CSS class to a GF HTML field.

   HTML structure inside the GF HTML field:
   <div class="gs-overview">
     <div class="gs-overview-lines" id="gs-overview-lines">
       <!-- JS populates line items here -->
     </div>
     <div class="gs-overview-total">
       <span>Totaal</span>
       <div class="gs-overview-total-amount">
         <span class="gs-total-price" id="gs-total-price">&euro; 0,00</span>
         <span class="gs-total-vat">Bedrag incl. btw</span>
       </div>
     </div>
     <div class="gs-overview-savings" id="gs-overview-savings" style="display:none;">
       <span>&#10003;</span>
       <span>Je bespaart <strong id="gs-savings-amount">&euro; 0,00</strong> op deze bestelling</span>
     </div>
   </div>
   ============================================== */

.gs-floating-form .gs-order-overview {
    grid-column: span 12;
}

.gs-floating-form .gs-order-overview > .gfield_label {
    display: none !important;
}

.gs-overview {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.gs-overview-lines {
    display: flex;
    flex-direction: column;
}

.gs-overview-line {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: #374151;
}

.gs-overview-line-name {
    flex: 1;
    min-width: 0;
    padding-right: 1rem;
}

.gs-overview-line-detail {
    font-size: 0.75rem;
    color: #94a3b8;
}

.gs-overview-line-price {
    font-weight: 500;
    white-space: nowrap;
    text-align: right;
}

.gs-overview-total {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.75rem 0 0.25rem;
    border-top: 1px solid #e2e8f0;
    margin-top: 0.25rem;
}

.gs-overview-total > span {
    font-weight: 700;
    font-size: 0.9375rem;
    color: #0f172a;
}

.gs-overview-total-amount {
    text-align: right;
}

.gs-total-price {
    display: block;
    font-weight: 700;
    font-size: 1.25rem;
    color: #22c55e;
}

.gs-total-vat {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 400;
}

.gs-overview-savings {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.625rem 0.875rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    color: #16a34a;
}

.gs-overview-savings span:first-child {
    font-weight: 700;
}


/* ==============================================
   TERMS CHECKBOX
   Add "gs-terms" CSS class to a GF Consent field.
   ============================================== */

.gs-floating-form .gs-terms {
    grid-column: span 12;
}

.gs-floating-form .gs-terms > .gfield_label {
    display: none !important;
}

.gs-floating-form .gs-terms .ginput_container {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
}

.gs-floating-form .gs-terms input[type="checkbox"] {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 1.125rem !important;
    height: 1.125rem !important;
    min-width: 1.125rem !important;
    padding: 0 !important;
    border: 1.5px solid #d1d5db !important;
    border-radius: 0.25rem !important;
    background: #fff !important;
    cursor: pointer !important;
    margin-top: 0.125rem !important;
    transition: all 0.15s ease !important;
    position: relative !important;
}

.gs-floating-form .gs-terms input[type="checkbox"]:checked {
    background: #22c55e !important;
    border-color: #22c55e !important;
}

.gs-floating-form .gs-terms input[type="checkbox"]:checked::after {
    content: '' !important;
    position: absolute !important;
    left: 0.3rem !important;
    top: 0.1rem !important;
    width: 0.3rem !important;
    height: 0.55rem !important;
    border: solid #fff !important;
    border-width: 0 2px 2px 0 !important;
    transform: rotate(45deg) !important;
}

.gs-floating-form .gs-terms .gfield_consent_label {
    font-size: 0.875rem !important;
    color: #374151 !important;
    line-height: 1.5 !important;
}

.gs-floating-form .gs-terms .gfield_consent_label a {
    color: #3b82f6;
    text-decoration: underline;
}


/* ==============================================
   TRUST BADGES
   Add "gs-trust-badges" CSS class to a GF HTML field.

   HTML structure inside the GF HTML field:
   <div class="gs-trust">
     <div class="gs-trust-item">
       <svg>...</svg>
       <div>
         <strong>Veilige betaling</strong>
         <span>Verbindingen zijn versleuteld met SSL.</span>
       </div>
     </div>
     <div class="gs-trust-item">
       <svg>...</svg>
       <div>
         <strong>Werkt gegarandeerd</strong>
         <span>In welke mate je ook zit, onze funnels...</span>
       </div>
     </div>
   </div>
   ============================================== */

.gs-floating-form .gs-trust-badges {
    grid-column: span 12;
}

.gs-floating-form .gs-trust-badges > .gfield_label {
    display: none !important;
}

.gs-trust {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 0.5rem 0 0;
}

.gs-trust-item {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
}

.gs-trust-item svg,
.gs-trust-item img {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    color: #22c55e;
    margin-top: 0.125rem;
}

.gs-trust-item strong {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.4;
}

.gs-trust-item span {
    display: block;
    font-size: 0.6875rem;
    color: #94a3b8;
    line-height: 1.4;
}


/* ==============================================
   HIDE LABEL UTILITY
   Add "gs-hide-label" CSS class to any GF field.
   ============================================== */

.gs-floating-form .gs-hide-label > .gfield_label {
    display: none !important;
}


/* ==============================================
   RESPONSIVE
   ============================================== */

@media (max-width: 640px) {
    .gs-floating-form .gfield,
    .gs-floating-form .gfield--width-half,
    .gs-floating-form .gfield--width-third,
    .gs-floating-form .gfield--width-quarter {
        grid-column: span 12 !important;
    }

    .gs-floating-form .ginput_complex .ginput_left,
    .gs-floating-form .ginput_complex .ginput_right {
        grid-column: span 12;
    }

    .gs-floating-form .gs-payment-methods .gfield_radio {
        flex-direction: row !important;
    }

    .gs-upsell-card {
        flex-direction: column;
    }

    .gs-upsell-image {
        flex: 0 0 auto;
        width: 100%;
        height: 10rem;
    }

    .gs-trust {
        grid-template-columns: 1fr;
    }
}
