/* ═══════════════════════════════════════════════════════════════════════════
   Webtonia Multistep Form – Premium Frontend CSS
   Design: Webtonia Brand Style (Light, Crisp, Premium)
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap');

/* ── Variables & Design System ──────────────────────────────────────────── */
:root {
    /* Brand Defaults (Can be overridden by inline styles) */
    --wtf-bg: #f3f5e9;
    --wtf-card-bg: #ffffff;
    --wtf-text: #115814;
    --wtf-muted: #6c7d6e;
    --wtf-accent: #3D8B37;
    --wtf-accent-bg: rgba(61, 139, 55, 0.12);
    --wtf-input-bg: #ffffff;
    --wtf-input-text: #115814;

    --wtf-max-width: 820px;
    --wtf-padding: 40px;
    --wtf-gap: 24px;
    --wtf-radius: 16px;
    --wtf-radius-sm: 10px;

    --wtf-transition: 0.24s cubic-bezier(0.4, 0, 0.2, 1);
    --wtf-shadow: 0 10px 40px rgba(17, 88, 20, 0.08);
}

/* ── Wrapper ─────────────────────────────────────────────────────────────── */
.wtf-wrapper {
    font-family: 'Outfit', sans-serif;
    background: var(--wtf-bg);
    color: var(--wtf-text);
    max-width: var(--wtf-max-width);
    margin: 40px auto;
    padding: var(--wtf-padding);
    border-radius: var(--wtf-radius);
    box-sizing: border-box;
    box-shadow: var(--wtf-shadow);
    line-height: 1.5;
    position: relative;
    overflow: hidden;
}

/* ── Headers ─────────────────────────────────────────────────────────────── */
.wtf-global-header {
    text-align: center;
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--wtf-text);
    letter-spacing: -0.02em;
}

.wtf-step-title {
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 700;
    margin: 0 0 12px;
    line-height: 1.2;
}

.wtf-step-desc {
    color: var(--wtf-muted);
    margin-bottom: 24px;
    font-size: 16px;
}

.wtf-step-header-img {
    width: 100%;
    height: auto;
    border-radius: var(--wtf-radius-sm);
    margin-bottom: 20px;
    object-fit: cover;
}

.wtf-step-inner-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
}

.wtf-btn-block {
    width: 100%;
}

/* ── Badges ──────────────────────────────────────────────────────────────── */
.wtf-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
    padding: 16px;
    background: var(--wtf-accent-bg);
    border-radius: var(--wtf-radius-sm);
}

.wtf-badge {
    color: var(--wtf-text);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wtf-badge::before {
    content: '';
    font-weight: 700;
}

/* ── Progress Bar ─────────────────────────────────────────────────────────── */
.wtf-progress-bar-wrap {
    height: 4px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 99px;
    margin-bottom: 12px;
    overflow: hidden;
}

.wtf-progress-bar {
    height: 100%;
    background: var(--wtf-accent);
    border-radius: 99px;
    transition: width var(--wtf-transition);
}

.wtf-progress-label {
    font-size: 13px;
    color: var(--wtf-muted);
    margin-bottom: 32px;
    text-align: right;
    font-weight: 500;
}

/* ── Layout ──────────────────────────────────────────────────────────────── */
.wtf-fields {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--wtf-gap);
    margin-bottom: 32px;
    align-items: start;
}

.wtf-field-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    grid-column: span 12;
}

.wtf-col-25 {
    grid-column: span 3;
}

.wtf-col-50 {
    grid-column: span 6;
}

.wtf-col-75 {
    grid-column: span 9;
}

.wtf-col-100 {
    grid-column: span 12;
}

@media (max-width: 600px) {

    .wtf-col-25,
    .wtf-col-50,
    .wtf-col-75 {
        grid-column: span 12;
    }

    .wtf-wrapper {
        margin: 0;
        border-radius: 0;
        padding: 24px 16px;
    }
}

/* ── Label & Inputs ──────────────────────────────────────────────────────── */
.wtf-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--wtf-text);
}

.wtf-required {
    color: var(--wtf-accent);
}

.wtf-input {
    background: var(--wtf-input-bg);
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--wtf-radius-sm);
    color: var(--wtf-input-text);
    font-family: inherit;
    font-size: 16px;
    padding: 14px 16px;
    transition: all var(--wtf-transition);
    width: 100%;
    box-sizing: border-box;
    outline: none;
}

.wtf-input:focus {
    border-color: var(--wtf-accent);
    box-shadow: 0 0 0 4px var(--wtf-accent-bg);
}

/* Error States */
.wtf-error-field .wtf-label {
    color: #d63031;
}

.wtf-error-field .wtf-input,
.wtf-error-field .wtf-tile {
    border-color: #d63031 !important;
    background: #fff8f8;
}

.wtf-error-field .wtf-tile:hover {
    background: #fff0f0;
}

textarea.wtf-input {
    min-height: 120px;
    resize: vertical;
}

/* ── Premium Tiles (Checkbox/Radio) ──────────────────────────────────────── */
.wtf-tile-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
}

.wtf-tile-group .wtf-tile {
    flex: 1 1 calc(50% - 6px); /* Default to 2 per row if possible */
    min-width: 250px;
}

@media (max-width: 600px) {
    .wtf-tile-group .wtf-tile {
        flex: 1 1 100%;
    }
}

.wtf-tile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: var(--wtf-card-bg);
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--wtf-radius-sm);
    cursor: pointer;
    transition: all var(--wtf-transition);
    user-select: none;
    position: relative;
}

.wtf-tile:hover {
    border-color: var(--wtf-accent);
    background: #fafbf5;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.wtf-tile input {
    display: none;
}

.wtf-tile-text {
    font-weight: 600;
    font-size: 17px;
    color: var(--wtf-text);
    flex: 1;
}

/* Premium Checkmark Box on the right */
.wtf-tile-checkmark {
    width: 28px;
    height: 28px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    transition: all var(--wtf-transition);
    flex-shrink: 0;
}

.wtf-tile input:checked+.wtf-tile-text+.wtf-tile-checkmark,
.wtf-tile--selected .wtf-tile-checkmark {
    background: var(--wtf-accent);
    border-color: var(--wtf-accent);
    box-shadow: 0 0 10px var(--wtf-accent-bg);
}

.wtf-tile input:checked~.wtf-tile-text,
.wtf-tile--selected .wtf-tile-text {
    color: var(--wtf-text);
}

.wtf-tile-check-box {
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.1s;
}

.wtf-tile input:checked+.wtf-tile-text+.wtf-tile-checkmark .wtf-tile-check-box {
    opacity: 1;
}

.wtf-tile--selected {
    border-color: var(--wtf-accent);
    background: var(--wtf-accent-bg);
}

/* ── Navigation ──────────────────────────────────────────────────────────── */
.wtf-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 12px;
}

.wtf-btn-back {
    background: transparent;
    border: none;
    color: var(--wtf-muted);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    padding: 12px 0;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color var(--wtf-transition);
}

.wtf-btn-back:hover {
    color: var(--wtf-text);
}

.wtf-btn-primary {
    background: var(--wtf-accent);
    color: #fff;
    border: none;
    border-radius: var(--wtf-radius-sm);
    font-size: 17px;
    font-weight: 700;
    padding: 16px 40px;
    cursor: pointer;
    font-family: inherit;
    transition: all var(--wtf-transition);
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.1);
}

.wtf-btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--wtf-accent-bg);
}

.wtf-btn-primary:active {
    transform: translateY(0);
}

/* ── Success State ────────────────────────────────────────────────────────── */
.wtf-success {
    text-align: center;
    padding: 60px 20px;
}

.wtf-success-icon {
    width: 80px;
    height: 80px;
    background: var(--wtf-accent);
    color: #fff;
    border-radius: 50%;
    font-size: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    animation: wtf-pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes wtf-pop {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ── Animation ───────────────────────────────────────────────────────────── */
.wtf-step {
    display: none;
    animation: wtf-fade-up 0.4s ease-out;
}

.wtf-step--active {
    display: block;
}

@keyframes wtf-fade-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Admin Preview Specific ─────────────────────────────────────────────── */
.wtf-is-preview .wtf-tile,
.wtf-is-preview .wtf-input,
.wtf-is-preview textarea {
    cursor: pointer !important;
}

.wtf-is-preview .wtf-field-row:hover {
    outline: 2px dashed var(--wtf-accent);
    outline-offset: 4px;
    border-radius: 4px;
}