/* Starter Mail — Frontend Forms */
:root {
    --stm-accent: #008AC9;
    --stm-dark: #2c2c2c;
    --stm-text: #555;
    --stm-bg: #f9f7f4;
    --stm-error: #d63031;
    --stm-success: #00b894;
}

.stm-form {
    /* Defaults — overridden by inline vars from settings */
    --stm-accent: #008AC9;
    --stm-btn-bg: #2c2c2c;
    --stm-btn-text: #ffffff;
    --stm-btn-r: 8px;
    --stm-input-r: 8px;
    --stm-input-b: #dddddd;
    --stm-max-w: 600px;
    --stm-btn-hover: #c8a97e;
    --stm-font: inherit;
    
    max-width: var(--stm-max-w);
    margin: 0 auto;
    font-family: var(--stm-font);
    padding: 24px 0 16px;
}
.stm-field {
    margin-bottom: 22px;
}
.stm-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--stm-dark);
    margin-bottom: 5px;
    font-family: inherit;
}
.stm-field input:not([type="checkbox"]):not([type="radio"]),
.stm-field select,
.stm-field textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    border: 1px solid var(--stm-input-b);
    border-radius: var(--stm-input-r);
    background: #fff;
    color: var(--stm-dark);
    transition: border-color .2s;
    box-sizing: border-box;
}
.stm-field input:not([type="checkbox"]):not([type="radio"]):focus,
.stm-field select:focus,
.stm-field textarea:focus {
    outline: none;
    border-color: var(--stm-accent);
    box-shadow: 0 0 0 2px rgba(200,169,126,.15);
}

/* Row layouts */
.stm-row {
    display: flex;
    gap: 16px;
}
.stm-half { flex: 1; min-width: 0; }
.stm-third { flex: 1; min-width: 0; }
.stm-pct { min-width: 0; }

/* Honeypot */
.stm-hp { position: absolute; left: -9999px; opacity: 0; height: 0; }

/* Button */
.stm-submit { margin-top: 32px; }
.stm-btn {
    display: inline-block;
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    color: var(--stm-btn-text);
    background: var(--stm-btn-bg);
    border: none;
    border-radius: var(--stm-btn-r);
    cursor: pointer;
    transition: background .2s, opacity .2s;
    letter-spacing: .3px;
}
.stm-btn:hover { background: var(--stm-btn-hover); }
.stm-btn:disabled { opacity: .5; cursor: not-allowed; }
.stm-btn-booking { background: var(--stm-btn-bg); }
.stm-btn-booking:hover { background: var(--stm-btn-hover, var(--stm-accent)); }

/* Status messages */
.stm-status {
    margin-top: 12px;
    font-size: 14px;
    font-family: inherit;
    min-height: 20px;
}
.stm-status.stm-success { color: var(--stm-success); font-weight: 600; }
.stm-status.stm-error { color: var(--stm-error); font-weight: 600; }
.stm-status.stm-loading { color: var(--stm-text); font-style: italic; }

/* Subscribe form — inline */
.stm-subscribe-form { max-width: 480px; }
.stm-subscribe-row {
    display: flex;
    gap: 10px;
}
.stm-subscribe-row input {
    flex: 1;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    border: 1px solid var(--stm-input-b);
    border-radius: var(--stm-input-r);
    box-sizing: border-box;
}
.stm-subscribe-row input:focus {
    outline: none;
    border-color: var(--stm-accent);
}

/* ── Mobile — unified touch-friendly forms ─────── */
@media (max-width: 600px) {
    /* Container breathing room */
    .stm-form { padding-left: 16px; padding-right: 16px; }

    /* Rows stack vertically */
    .stm-row { flex-direction: column; gap: 0; }
    .stm-subscribe-row { flex-direction: column; gap: 10px; }

    /* Inputs — 16px font prevents iOS zoom, bigger touch target */
    .stm-field input:not([type="checkbox"]):not([type="radio"]),
    .stm-field select,
    .stm-field textarea,
    .stm-subscribe-row input {
        font-size: 16px;
        padding: 14px 16px;
        border-radius: 12px;
    }

    /* Labels — slightly bigger for readability */
    .stm-field label { font-size: 14px; margin-bottom: 6px; }

    /* Buttons — full width, tall touch target */
    .stm-btn {
        width: 100%;
        text-align: center;
        padding: 16px 24px;
        font-size: 16px;
        border-radius: 12px;
    }

    /* Radio cards — roomier on mobile */
    .stm-radio-label {
        padding: 14px 16px;
        font-size: 15px;
        border-radius: 12px;
    }

    /* Checkbox — bigger tap area */
    .stm-checkbox-label {
        font-size: 14px !important;
        gap: 12px;
        padding: 4px 0 !important;
    }
    .stm-checkbox-label input[type="checkbox"] {
        width: 20px !important;
        height: 20px !important;
    }

    /* Status messages */
    .stm-status { font-size: 15px; }
}


/* Star Rating — Apple-style interactive */
.stm-stars {
    display: flex !important;
    justify-content: center !important;
    gap: 10px;
    padding: 8px 0;
    width: 100%;
    margin: 0 auto;
}
.stm-field-stars { text-align: center !important; }
.stm-field-stars > label { text-align: center !important; display: block !important; margin-left: auto !important; margin-right: auto !important; }
.stm-stars input { display: none; }
.stm-stars label {
    display: block !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    cursor: pointer;
    transition: transform .2s cubic-bezier(.34,1.56,.64,1);
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
}
.stm-stars label:hover { transform: scale(1.3); }
.stm-stars label:active { transform: scale(.85); }
.stm-stars label svg { display: block; }
.stm-stars .stm-star-svg { width: 36px; height: 36px; transition: all .2s ease; filter: drop-shadow(0 1px 2px rgba(0,0,0,.06)); }
.stm-stars .stm-star-svg .star-fill { fill: #e8e8ed; transition: fill .2s ease; }
.stm-stars .stm-star-svg .star-stroke { fill: none; stroke: #d1d1d6; stroke-width: .8; transition: stroke .2s ease; }
.stm-stars.stm-stars-hover .stm-star-svg.lit .star-fill { fill: #FFD60A; }
.stm-stars.stm-stars-hover .stm-star-svg.lit .star-stroke { stroke: #F0C800; }
.stm-stars.stm-stars-hover .stm-star-svg.lit { filter: drop-shadow(0 2px 6px rgba(255,214,10,.35)); }
.stm-stars .stm-star-svg.active .star-fill { fill: #FFD60A; }
.stm-stars .stm-star-svg.active .star-stroke { stroke: #F0C800; }
.stm-stars .stm-star-svg.active { filter: drop-shadow(0 2px 6px rgba(255,214,10,.35)); }

/* Checkbox field — compact layout */
.stm-field-checkbox {
    margin-bottom: 8px !important;
}

/* Checkbox label */
.stm-checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    font-size: 13px !important;
    font-weight: 400 !important;
    font-family: inherit !important;
    cursor: pointer;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    color: var(--stm-text, #6e6e73);
    letter-spacing: 0;
    line-height: 1.4;
}
.stm-checkbox-label:hover { color: var(--stm-accent, #008AC9); }
.stm-checkbox-label input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    padding: 0 !important;
    margin: 0 !important;
    accent-color: var(--stm-accent, #008AC9);
    flex-shrink: 0;
    border-radius: 3px;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer;
}
.stm-field:has(.stm-checkbox-label) {
    margin-bottom: 8px;
}

/* ── Brief / Intake Forms — Apple-clean ──────────── */
.stm-brief { max-width: 640px; margin: 0 auto; }

/* Progress — minimal line style */
.stm-brief-progress { display: flex; align-items: center; justify-content: center; gap: 0; margin-bottom: 36px; padding: 0 20px; }
.stm-brief-step-dot { display: flex; align-items: center; gap: 0; opacity: .35; transition: opacity .3s; }
.stm-brief-step-dot.active, .stm-brief-step-dot.done { opacity: 1; }
.stm-brief-step-num {
    width: 28px; height: 28px; border-radius: 8px; font-size: 12px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    background: rgba(128,128,128,.15); color: currentColor;
    transition: all .3s;
}
.stm-brief-step-dot.active .stm-brief-step-num { background: var(--stm-accent, #008AC9); color: #fff; }
.stm-brief-step-dot.done .stm-brief-step-num { background: var(--stm-accent, #008AC9); color: #fff; opacity: .7; }
.stm-brief-step-label { font-size: 11px; margin-left: 6px; margin-right: 16px; color: inherit; white-space: nowrap; }
.stm-brief-step-dot:last-child .stm-brief-step-label { margin-right: 0; }

/* Step content */
.stm-brief-step-title { font-size: 22px; font-weight: 700; margin: 0 0 2px; letter-spacing: -.01em; text-align: center; }
.stm-brief-step-desc { font-size: 14px; color: var(--stm-text, #86868b); margin: 0 0 24px; text-align: center; }
.stm-brief-heading { font-size: 14px; font-weight: 600; margin: 28px 0 8px; padding-top: 20px; border-top: 1px solid var(--stm-input-b, #e5e5ea); color: var(--stm-dark, #1d1d1f); letter-spacing: -.01em; }
.stm-brief-desc { font-size: 13px; color: var(--stm-text, #86868b); margin: 0 0 12px; }

/* Navigation */
.stm-brief-nav { display: flex; justify-content: center; margin-top: 32px; gap: 12px; }
.stm-brief-nav:has(.stm-btn-prev) { justify-content: space-between; }
.stm-btn-prev { background: transparent !important; color: var(--stm-accent, #008AC9) !important; border: 1px solid var(--stm-input-b, #d2d2d7) !important; font-weight: 500 !important; }
.stm-btn-prev:hover { border-color: var(--stm-accent, #008AC9) !important; }
.stm-btn-next { margin-left: auto; }

/* Radio — card style */
.stm-radio-group { display: flex; flex-direction: column; gap: 6px; }
.stm-radio-label {
    display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer;
    padding: 12px 14px; border: 1px solid var(--stm-input-b, #d2d2d7);
    border-radius: var(--stm-input-r, 10px); transition: all .2s;
}
.stm-radio-label:hover { border-color: var(--stm-accent, #008AC9); }
.stm-radio-label input[type="radio"] { accent-color: var(--stm-accent, #008AC9); width: 16px; height: 16px; flex-shrink: 0; }
.stm-radio-label input:checked + span { font-weight: 600; color: var(--stm-dark, #1d1d1f); }
.stm-radio-label:has(input:checked) { border-color: var(--stm-accent, #008AC9); background: rgba(0,138,201,.04); }

/* File hint */
.stm-field-hint { font-size: 11px; color: var(--stm-text, #86868b); margin: 4px 0 0; }

@media (max-width: 600px) {
    /* Brief container */
    .stm-brief { padding: 0 16px; }

    /* Progress dots */
    .stm-brief-progress { flex-wrap: wrap; gap: 8px; padding: 0; }
    .stm-brief-step-label { display: none; }
    .stm-brief-step-num { width: 32px; height: 32px; font-size: 13px; border-radius: 10px; }

    /* Step titles */
    .stm-brief-step-title { font-size: 20px; }
    .stm-brief-step-desc { font-size: 15px; }

    /* Navigation — stacked full-width */
    .stm-brief-nav { flex-direction: column; }
    .stm-btn-next, .stm-btn-prev {
        width: 100%;
        text-align: center;
        padding: 16px 24px !important;
        font-size: 16px !important;
        border-radius: 12px !important;
    }
}
