/* =====================================================
   F360 PRICE CALCULATOR v2.0
   Mobile-first, Aveo-inspired
   ===================================================== */

/* ---- RESET & BASE ---- */
.f360-calc {
    max-width: 960px;
    margin: 0 auto;
    position: relative;
}

.f360-calc * {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* ---- HEADER (badge + price box) ---- */
.f360-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
}

.f360-badge {
    display: inline-block;
    padding: 10px 24px;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

/* ---- PRICE BOX ---- */

.f360-price-box {
    background: #ffa800;
    border-radius: 10px;
    padding: 10px 24px;
    text-align: center;
    align-self: center;
    width: auto;
}

.f360-price-label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.f360-price-value {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
}

.f360-price-box--visible {
    display: inline-block !important;
    animation: f360-fadeIn 0.3s ease;
}

@keyframes f360-fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- STEPS (stacked for crossfade) ---- */
.f360-steps-container {
    position: relative;
}

.f360-step {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s 0.3s;
    pointer-events: none;
}

.f360-step--active {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s 0s;
    pointer-events: auto;
}

.f360-step-title {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    text-align: left;
    margin: 0 0 6px;
}

.f360-step-desc {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    text-align: left;
    margin: 0 0 20px;
}

/* ---- CVR STEP: SPLIT LAYOUT ---- */

/* Hide USP box on mobile when setting enabled */
.f360-calc--hide-usps-mobile .f360-cvr-right {
    display: none;
}

@media (min-width: 640px) {
    .f360-calc--hide-usps-mobile .f360-cvr-right {
        display: flex;
    }
}

.f360-cvr-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.f360-cvr-left {
    flex: 1;
    min-width: 0;
}

.f360-cvr-left .f360-step-title,
.f360-cvr-left .f360-step-desc {
    text-align: left;
}

.f360-cvr-right {
    background: #ffa800;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Reset Divi/theme list overrides inside orange box */
.f360-cvr-right ul,
.f360-cvr-right li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    text-indent: 0 !important;
}

.f360-cvr-right .f360-usps li {
    padding: 5px 0 5px 28px !important;
}

.f360-usps {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
}

.f360-usps li {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    padding: 5px 0 5px 28px;
    position: relative;
    line-height: 1.4;
    list-style: none !important;
}

.f360-usps li:last-child {
    padding-bottom: 0;
}

.f360-usps li::before {
    content: '✓';
    position: absolute;
    left: 0;
    font-weight: 700;
}

.f360-usps li::marker {
    content: none;
    display: none;
}

/* ---- CVR SEARCH ---- */
.f360-cvr-search {
    position: relative;
    margin-bottom: 16px;
}

.f360-cvr-search input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    font-size: 15px;
    background: rgba(255,255,255,0.05);
    color: #fff;
    outline: none;
    transition: border-color 0.2s;
    caret-color: #ffa800;
}

.f360-cvr-search input::placeholder {
    color: rgba(255,255,255,0.4);
}

.f360-cvr-search input:focus {
    border-color: #ffa800;
    background: rgba(255,255,255,0.08);
    color: #fff;
}

/* Force white text even when autofilled */
.f360-cvr-search input:-webkit-autofill {
    -webkit-text-fill-color: #fff;
}

.f360-cvr-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 0 0 8px 8px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 50;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.f360-cvr-result {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid #f0f0f0;
}

.f360-cvr-result:hover {
    background: #f8f8f8;
}

.f360-cvr-result:last-child {
    border-bottom: none;
}

.f360-cvr-result-name {
    font-weight: 600;
    color: #222;
    font-size: 14px;
}

.f360-cvr-result-detail {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

/* ---- CVR BUTTONS ---- */
.f360-cvr-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.f360-cvr-buttons .f360-btn--ghost {
    white-space: normal;
    text-align: center;
}

/* ---- BUTTONS ---- */
.f360-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.f360-btn--primary {
    background: #ffa800;
    color: #fff;
}

.f360-btn--primary:hover {
    background: #e69500;
    transform: translateY(-1px);
}

.f360-btn--ghost {
    background: transparent;
    color: rgba(255,255,255,0.5);
    padding: 12px 16px;
    white-space: normal;
    text-align: center;
    max-width: 160px;
}

.f360-btn--ghost:hover {
    color: #ffa800;
}

/* ---- CHOICES ---- */
.f360-choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.f360-choice {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px 20px;
    background: rgba(255,255,255,0.12);
    border: 2px solid rgba(255,255,255,0.18);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
    color: #fff;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

/* Sequential hop animation (1 hops, then 2, then 3, repeat) */
@keyframes f360-hop {
    0%, 12%, 100% { transform: translateY(0); }
    6% { transform: translateY(-8px); }
}

.f360-step--active .f360-choice:nth-child(1) { animation: f360-hop 3.6s ease-in-out infinite; animation-delay: 0s; }
.f360-step--active .f360-choice:nth-child(2) { animation: f360-hop 3.6s ease-in-out infinite; animation-delay: 1.2s; }
.f360-step--active .f360-choice:nth-child(3) { animation: f360-hop 3.6s ease-in-out infinite; animation-delay: 2.4s; }
.f360-step--active .f360-choice:nth-child(4) { animation: f360-hop 3.6s ease-in-out infinite; animation-delay: 0.6s; }
.f360-step--active .f360-choice:nth-child(5) { animation: f360-hop 3.6s ease-in-out infinite; animation-delay: 1.8s; }
.f360-step--active .f360-choice:nth-child(6) { animation: f360-hop 3.6s ease-in-out infinite; animation-delay: 3.0s; }

.f360-choice:hover {
    border-color: #ffa800;
    background: rgba(255,168,0,0.08);
    animation-play-state: paused;
}

.f360-choice--selected {
    border-color: #ffa800;
    background: rgba(255,168,0,0.12);
}

.f360-choice-icon {
    font-size: 24px;
    flex-shrink: 0;
    width: 40px;
    text-align: center;
}

/* SVG icon inside choice */
.f360-svg-icon {
    display: inline-block;
    width: 32px;
    height: 32px;
    color: #ffa800;
}

.f360-svg-icon svg {
    width: 100%;
    height: 100%;
}

.f360-choice-title {
    font-size: 15px;
    font-weight: 600;
    flex: 1;
}

.f360-choice-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.f360-choice-sub {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    font-weight: 400;
}

/* ---- NAVIGATION ---- */
.f360-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

/* ---- FORM FIELDS ---- */
.f360-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 16px;
}

.f360-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    margin-bottom: 4px;
}

.f360-field input,
.f360-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    font-size: 15px;
    background: rgba(255,255,255,0.05);
    color: #fff !important;
    -webkit-text-fill-color: #fff;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
    caret-color: #ffa800;
}

.f360-field input:focus,
.f360-field textarea:focus {
    border-color: #ffa800;
    color: #fff !important;
    -webkit-text-fill-color: #fff;
}

.f360-field input::placeholder,
.f360-field textarea::placeholder {
    color: rgba(255,255,255,0.3);
    -webkit-text-fill-color: rgba(255,255,255,0.3);
}

.f360-field input:-webkit-autofill,
.f360-field input:-webkit-autofill:hover,
.f360-field input:-webkit-autofill:focus,
.f360-field textarea:-webkit-autofill,
.f360-field textarea:-webkit-autofill:hover,
.f360-field textarea:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff !important;
    -webkit-box-shadow: 0 0 0 9999px #1e2a3a inset !important;
    border-color: rgba(255,255,255,0.15);
    transition: background-color 5000s ease-in-out 0s;
}

/* ---- GDPR ---- */
.f360-gdpr {
    margin: 20px 0;
}

.f360-checkbox {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    cursor: pointer;
    line-height: 1.5;
}

.f360-checkbox input {
    margin-top: 3px;
    accent-color: #ffa800;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ---- PROGRESS BAR ---- */
.f360-progress {
    margin-top: 16px;
}

.f360-progress-bar {
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
}

.f360-progress-fill {
    height: 100%;
    background: #ffa800;
    border-radius: 2px;
    transition: width 0.4s ease;
    width: 0%;
}

.f360-step-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.f360-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.3);
    border: 2px solid rgba(255,255,255,0.1);
    transition: all 0.3s;
}

.f360-dot--active {
    border-color: #ffa800;
    color: #ffa800;
}

.f360-dot--done {
    border-color: #ffa800;
    background: #ffa800;
    color: #fff;
}

/* ---- LOADING ---- */
.f360-step--loading {
    text-align: center;
    padding: 60px 0;
    color: rgba(255,255,255,0.6);
}

.f360-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: #ffa800;
    border-radius: 50%;
    animation: f360-spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes f360-spin {
    to { transform: rotate(360deg); }
}

/* ---- SUCCESS ---- */
.f360-step--success {
    text-align: center;
    padding: 40px 0;
    color: #fff;
}

.f360-step--success h3 {
    color: #fff;
}

.f360-success-icon {
    width: 60px;
    height: 60px;
    background: #ffa800;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 16px;
}

.f360-success-msg {
    color: rgba(255,255,255,0.7);
    font-size: 15px;
}

/* =====================================================
   TABLET & DESKTOP OVERRIDES
   ===================================================== */

@media (min-width: 640px) {
    .f360-badge {
        font-size: 16px;
        padding: 12px 28px;
    }
    
    .f360-step-title {
        font-size: 24px;
    }
    
    .f360-cvr-buttons {
        justify-content: flex-start;
    }
    
    .f360-btn--ghost {
        white-space: nowrap;
        max-width: none;
    }
    
    .f360-cvr-layout {
        flex-direction: row;
        gap: 24px;
    }
    
    .f360-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }
    
    .f360-cvr-left {
        flex: 1;
    }
    
    .f360-cvr-right {
        flex: 0 0 280px;
    }
    
    .f360-form-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .f360-field--full {
        grid-column: 1 / -1;
    }
    
    /* Grid layout for choices on wider screens */
    .f360-choices {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 14px;
    }
    
    .f360-choice {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
        min-height: 120px;
        justify-content: center;
        align-items: center;
    }
    
    .f360-choice-icon {
        font-size: 32px;
        width: auto;
    }
    
    .f360-choice .f360-svg-icon {
        width: 40px;
        height: 40px;
    }
}

@media (min-width: 960px) {
    .f360-cvr-right {
        flex: 0 0 320px;
    }
}
