/* ===================================
   TESLA-INSPIRED FORMINATOR FORM STYLES
   =================================== */

/* Main form container */
.forminator-ui {
    max-width: 680px;
    margin: 0 auto;
    padding: 48px 40px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.02),
        0 12px 24px rgba(0, 0, 0, 0.04),
        0 24px 48px rgba(0, 0, 0, 0.06);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Form fields wrapper defaults */
.forminator-row {
    margin-bottom: 28px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Labels */
.forminator-label,
.forminator-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
    color: #1a1a1a;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

/* Input fields */
.forminator-input,
.forminator-select,
.forminator-textarea,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 16px 18px;
    font-size: 16px;
    font-weight: 400;
    color: #1a1a1a;
    background: #ffffff;
    border: 1.5px solid #e1e4e8;
    border-radius: 10px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   VISUAL REFINEMENT 1: Liquid Glass Input Styles
   -------------------------------------------------------------------------- */
.forminator-input,
textarea {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.01),
        inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
}

.forminator-input:focus,
textarea:focus {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: #3e6ae1 !important;
    box-shadow:
        0 0 0 4px rgba(62, 106, 225, 0.1),
        0 2px 8px rgba(62, 106, 225, 0.12) !important;
    transform: translateY(-1px);
}

/* Input hover state */
.forminator-input:hover,
textarea:hover {
    border-color: #b8c2d1;
}

/* Placeholder styling */
::placeholder {
    color: #8b95a5;
    opacity: 1;
}

/* --------------------------------------------------------------------------
   VISUAL REFINEMENT 2: Side-by-Side Names & Spacing
   -------------------------------------------------------------------------- */
.forminator-row:has(#name-1),
.forminator-row:has(#name-2) {
    display: flex !important;
    justify-content: space-between !important;
    width: 100% !important;
}

.forminator-row:has(#name-1) .forminator-col-6 {
    width: 49% !important;
    margin-right: 0 !important;
    flex: 0 0 49% !important;
    max-width: 49% !important;
}

/* --------------------------------------------------------------------------
   VISUAL REFINEMENT 3: Divider between Phone and Date
   -------------------------------------------------------------------------- */
.forminator-row:has(#phone-1) {
    border-bottom: 1px solid #e1e4e8;
    padding-bottom: 32px;
    margin-bottom: 32px;
}

/* --------------------------------------------------------------------------
   VISUAL REFINEMENT 4: Custom JS Dropdown Styles (Liquid Glass)
   -------------------------------------------------------------------------- */
/* Hide Native Select */
.forminator-select--field select {
    display: none !important;
}

/* The custom dropdown container injected by JS */
.custom-dropdown {
    position: relative;
    width: 100%;
}

/* The Trigger (looks like input) */
.custom-dropdown-trigger {
    width: 100%;
    padding: 16px 18px;
    font-size: 16px;
    color: #1a1a1a;
    border-radius: 10px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.01), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    user-select: none;
}

.custom-dropdown-trigger::after {
    content: '';
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 6px;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%231a1a1a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    transition: transform 0.3s ease;
}

.custom-dropdown.open .custom-dropdown-trigger::after {
    transform: translateY(-50%) rotate(180deg);
}

.custom-dropdown.open .custom-dropdown-trigger {
    border-color: #3e6ae1;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* The Options Menu */
.custom-dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-top: none;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    z-index: 1000;
    max-height: 0;
    /* Animate height */
    overflow: hidden;
    opacity: 0;
    transform-origin: top;
    transform: scaleY(0.95);
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.custom-dropdown.open .custom-dropdown-options {
    max-height: 300px;
    opacity: 1;
    transform: scaleY(1);
    padding: 8px 0;
}

.custom-option {
    padding: 12px 18px;
    cursor: pointer;
    font-size: 15px;
    color: #4b5563;
    transition: background 0.2s;
}

.custom-option:hover {
    background: rgba(62, 106, 225, 0.1);
    color: #3e6ae1;
}

.custom-option.selected {
    color: #3e6ae1;
    font-weight: 600;
    background: rgba(62, 106, 225, 0.05);
}

/* Locations Subtitle adjustments */
#select-1~.forminator-description {
    font-size: 11px !important;
    color: #8b95a5 !important;
    margin-top: 4px !important;
    margin-bottom: 2px !important;
}

/* --------------------------------------------------------------------------
   VISUAL REFINEMENT 5: "Warped" Datepicker Animation
   -------------------------------------------------------------------------- */
#ui-datepicker-div {
    display: none;
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 18px !important;
    padding: 16px !important;
    font-family: inherit !important;

    /* Warp Animation */
    transform-origin: 20px -20px;
    /* Top left, slightly offset */
    animation: warpGrow 0.6s cubic-bezier(0.19, 1, 0.22, 1) forwards !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
}

/* 
   Warp Logic:
   Start small, pulled towards the corner, clip-circle tight.
   Unlock to full size.
*/
@keyframes warpGrow {
    0% {
        opacity: 0;
        transform: scale(0.2) translate(-50px, -50px) rotate(-10deg);
        clip-path: circle(10% at 0 0);
        filter: blur(10px);
    }

    50% {
        opacity: 1;
        clip-path: circle(80% at 20% 20%);
    }

    100% {
        opacity: 1;
        transform: scale(1) translate(0, 0) rotate(0deg);
        clip-path: circle(150% at 50% 50%);
        filter: blur(0);
    }
}

/* Datepicker Internals */
#ui-datepicker-div .ui-datepicker-header {
    background: transparent !important;
    border: none !important;
}

#ui-datepicker-div .ui-datepicker-title {
    font-weight: 600 !important;
    color: #1a1a1a !important;
}

#ui-datepicker-div .ui-state-default {
    background: transparent !important;
    border: none !important;
    color: #4b5563 !important;
    text-align: center !important;
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    line-height: 32px !important;
    transition: all 0.2s ease !important;
}

#ui-datepicker-div .ui-state-hover,
#ui-datepicker-div .ui-state-active {
    background: rgba(62, 106, 225, 0.9) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(62, 106, 225, 0.3) !important;
}

/* --------------------------------------------------------------------------
   Address Grid Layout (Used by JS Wrapper)
   -------------------------------------------------------------------------- */
.address-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 10px 0;
    width: 100%;
}

.address-grid>.forminator-field-address {
    flex: 1 1 300px;
    /* Min 300px */
    max-width: 100%;
    /* Card look */
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    border-radius: 12px;
    padding: 24px !important;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-sizing: border-box;
}

@media (min-width: 1024px) {

    /* If we have 3, let them be ~32% */
    .address-grid>.forminator-field-address:nth-last-child(n+3),
    .address-grid>.forminator-field-address:nth-last-child(n+3)~.forminator-field-address {
        max-width: calc(33.33% - 14px);
    }

    /* If we have 2, let them be ~49% */
    .address-grid>.forminator-field-address:first-child:nth-last-child(2),
    .address-grid>.forminator-field-address:first-child:nth-last-child(2)~.forminator-field-address {
        max-width: calc(50% - 10px);
    }
}

/* Internal overrides for squished addresses */
.address-grid .forminator-field-address .forminator-row {
    margin-bottom: 12px !important;
}

.address-grid .forminator-field-address .forminator-label {
    font-size: 10px !important;
    color: #6b7280 !important;
}


/* Price Display HTML Field Styling */
.price-display-wrapper {
    position: relative;
    text-align: center;
    margin: 32px 0;
}

.price-label {
    position: absolute;
    top: 14px;
    left: 0;
    right: 0;
    margin: 0 auto;
    font-size: 10px !important;
    font-weight: 600;
    letter-spacing: 0.8px;
    color: #8b95a5;
    text-transform: uppercase;
    z-index: 2;
    pointer-events: none;
}

.price-display {
    font-size: 42px;
    font-weight: 600;
    color: #3e6ae1;
    padding: 34px 24px 20px 24px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e6edff 100%);
    border: 2px solid #d0deff;
    border-radius: 20px;
    letter-spacing: -1px;
    user-select: none;
    box-shadow: inset 0 2px 4px rgba(62, 106, 225, 0.08), 0 4px 12px rgba(62, 106, 225, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.price-display::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, transparent 60%);
    opacity: 0.5;
    transform: rotate(30deg);
    pointer-events: none;
}


/* Submit button */
.forminator-button,
.forminator-button-submit,
button[type="submit"] {
    width: 100%;
    padding: 18px 32px;
    margin-top: 32px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #ffffff;
    background: linear-gradient(135deg, #3e6ae1 0%, #2d50b8 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(62, 106, 225, 0.2), 0 8px 24px rgba(62, 106, 225, 0.15);
    text-transform: uppercase;
}

.forminator-button:hover,
button[type="submit"]:hover {
    background: linear-gradient(135deg, #2d50b8 0%, #1e3a8a 100%);
    transform: translateY(-2px);
}
