/* ============================================================
   Hupacha Feedback Formulieren — Frontend CSS
   Follows base.css design system (color vars, Georgia serif)
   ============================================================ */

/* ── Page wrapper ───────────────────────────────────────────── */
.hff-page {
    background: var(--color-cream, #F5F0EB);
    min-height: 100vh;
    padding: 40px 0;
}

.hff-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── Header ──────────────────────────────────────────────────── */
.hff-header {
    text-align: center;
    margin-bottom: 30px;
}
.hff-header h1 {
    font-family: Georgia, serif;
    font-weight: 400;
    color: var(--color-warm-oak, #5D4A37);
    font-size: 2rem;
    margin-bottom: 10px;
}
.hff-incentive-banner {
    background: #fff;
    border: 2px solid var(--color-gold, #C5A352);
    border-radius: 8px;
    padding: 15px 20px;
    margin: 15px 0;
    text-align: center;
    font-size: 0.95rem;
    color: var(--color-anthracite, #2F2F2F);
}
.hff-incentive-banner strong { color: var(--color-warm-oak, #5D4A37); }

/* ── Access code screen ─────────────────────────────────────── */
.hff-access-box .hff-status-icon {
    filter: sepia(1) saturate(3) hue-rotate(5deg) brightness(1.05);
}
.hff-access-box {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    padding: 40px;
    text-align: center;
}
.hff-access-box h2 {
    font-family: Georgia, serif;
    font-weight: 400;
    color: var(--color-warm-oak, #5D4A37);
    margin-bottom: 10px;
}
.hff-access-box p { color: #666; margin-bottom: 25px; }
.hff-code-input-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    max-width: 360px;
    margin: 0 auto;
}
.hff-code-input-group .hff-btn-primary {
    padding-top: 0;
    padding-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
@media (max-width: 600px) {
    .hff-code-input-group .hff-btn-primary {
        padding-top: 14px;
        padding-bottom: 14px;
    }
}
.hff-code-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1.1rem;
    font-family: Georgia, serif;
    text-align: center;
    letter-spacing: 3px;
    text-transform: uppercase;
    min-width: 160px;
}
.hff-code-input:focus { outline: none; border-color: var(--color-warm-oak, #5D4A37); }
.hff-code-input::placeholder { color: #c8c8c8; }

/* ── Form area ───────────────────────────────────────────────── */
.hff-form-area {
    position: relative;
}

/* ── Answered questions (history above) ─────────────────────── */
.hff-answered-list { margin-bottom: 20px; }
.hff-answered-item {
    background: #fff;
    border-radius: 6px;
    padding: 14px 18px;
    margin-bottom: 8px;
    border-left: 3px solid var(--color-gold, #C5A352);
    animation: hff-slide-in 0.3s ease;
}
.hff-answered-item .hff-q-label {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 4px;
}
.hff-answered-item .hff-q-answer {
    font-weight: 600;
    color: var(--color-warm-oak, #5D4A37);
}

/* ── Current question card ───────────────────────────────────── */
.hff-current-question {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    padding: 30px;
    animation: hff-slide-in 0.35s ease;
}
.hff-question-text {
    font-family: Georgia, serif;
    font-size: 1.2rem;
    color: var(--color-warm-oak, #5D4A37);
    margin-bottom: 20px;
    line-height: 1.5;
}
.hff-question-subtext {
    font-family: inherit;
    font-weight: 400;
    font-size: 0.9rem;
    color: #666;
    margin-top: -12px;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* ── Open question ───────────────────────────────────────────── */
.hff-open-field textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: Georgia, serif;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.3s;
}
.hff-open-field textarea:focus { outline: none; border-color: var(--color-warm-oak, #5D4A37); }
.hff-open-submit {
    margin-top: 12px;
    text-align: right;
}

/* ── Multiple choice options ─────────────────────────────────── */
.hff-mc-options { display: flex; flex-direction: column; gap: 10px; }
.hff-mc-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fafafa;
}
.hff-mc-option:hover { border-color: var(--color-gold, #C5A352); background: #fffdf7; }
.hff-mc-option.selected { border-color: var(--color-warm-oak, #5D4A37); background: #f5f0eb; }
.hff-mc-radio {
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hff-mc-option.selected .hff-mc-radio {
    border-color: var(--color-warm-oak, #5D4A37);
    background: var(--color-warm-oak, #5D4A37);
}
.hff-mc-option.selected .hff-mc-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
}
.hff-mc-label { flex: 1; font-size: 1rem; color: var(--color-anthracite, #2F2F2F); }

/* Multi-select checkbox indicator */
.hff-mc-radio.is-checkbox {
    border-radius: 3px;
}
.hff-mc-option.is-multi.selected .hff-mc-radio.is-checkbox {
    border-color: var(--color-warm-oak, #5D4A37);
    background: var(--color-warm-oak, #5D4A37);
}
.hff-mc-option.is-multi.selected .hff-mc-radio.is-checkbox::after {
    content: '✓';
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    width: auto;
    height: auto;
    background: transparent;
    border-radius: 0;
}

/* MC + open: "Eigen invoer" option */
.hff-mc-open-input {
    margin-top: 10px;
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: Georgia, serif;
}
.hff-mc-open-input:focus { outline: none; border-color: var(--color-warm-oak, #5D4A37); }

.hff-mc-confirm {
    margin-top: 15px;
    text-align: right;
}

/* ── Progress indicator ─────────────────────────────────────── */
.hff-progress {
    background: #e9ecef;
    border-radius: 10px;
    height: 6px;
    margin-bottom: 25px;
    overflow: hidden;
}
.hff-progress-fill {
    height: 100%;
    background: var(--color-gold, #C5A352);
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* ── End section (after questions) ──────────────────────────── */
.hff-end-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    padding: 35px;
    animation: hff-slide-in 0.35s ease;
}
.hff-end-section h2 {
    font-family: Georgia, serif;
    font-weight: 400;
    color: var(--color-warm-oak, #5D4A37);
    margin-bottom: 10px;
}

/* Coupon display */
.hff-coupon-box {
    background: #fffdf0;
    border: 2px dashed var(--color-gold, #C5A352);
    border-radius: 8px;
    padding: 20px 25px;
    text-align: center;
    margin: 20px 0;
}
.hff-coupon-label { font-size: 0.9rem; color: #666; margin-bottom: 5px; }
.hff-coupon-code {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--color-warm-oak, #5D4A37);
    font-family: monospace;
}
.hff-coupon-meta { font-size: 0.85rem; color: #888; margin-top: 8px; }

/* Optional info section */
.hff-optional-info {
    border-top: 1px solid #eee;
    margin-top: 25px;
    padding-top: 20px;
}
.hff-optional-info p { color: #666; font-size: 0.9rem; margin-bottom: 15px; }
.hff-optional-info .description { font-style: italic; }

.hff-form-group {
    max-width: 50%;
    margin: 0 auto 15px;
}
.hff-form-group label {
    display: block;
    font-weight: 600;
    color: var(--color-warm-oak, #5D4A37);
    margin-bottom: 6px;
    font-size: 0.95rem;
}
.hff-form-group label .required { color: #c00; margin-left: 3px; }
.hff-form-group input[type="text"],
.hff-form-group input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: Georgia, serif;
    transition: border-color 0.3s;
}
.hff-form-group input:focus { outline: none; border-color: var(--color-warm-oak, #5D4A37); }

/* Newsletter checkbox */
.hff-newsletter-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 0;
    margin-top: 15px;
}
.hff-newsletter-row input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; width: 18px; height: 18px; }
.hff-newsletter-row label { font-size: 0.9rem; color: #444; cursor: pointer; }

/* Submit button */
.hff-submit-row { margin-top: 20px; text-align: center; }

/* Webshop link section (separate card below thank-you sections) */
.hff-shop-section {
    margin-top: 20px;
    text-align: center;
}
.hff-shop-section p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 15px;
    font-family: Georgia, serif;
}
.hff-btn-shop {
    background: var(--color-gold, #C5A352);
    color: #fff;
    padding: 14px 36px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-family: Georgia, serif;
    line-height: 1;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: all 0.3s ease;
}
.hff-btn-shop:hover { background: #a78943; box-shadow: 0 3px 10px rgba(0,0,0,0.15); color: #fff; }

/* ── Back button ────────────────────────────────────────────── */
.hff-back-row {
    margin-bottom: 14px;
}
.hff-btn-back {
    background: none;
    border: none;
    color: #999;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0;
    font-family: Georgia, serif;
    transition: color 0.2s;
}
.hff-btn-back:hover { color: var(--color-warm-oak, #5D4A37); }

/* ── Buttons ─────────────────────────────────────────────────── */
.hff-btn-primary {
    background: var(--color-gold, #C5A352);
    color: #fff;
    padding: 14px 36px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-family: Georgia, serif;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}
.hff-btn-primary:hover { background: #a78943; box-shadow: 0 3px 10px rgba(0,0,0,0.15); }
.hff-btn-primary:disabled { background: #d6c9a8; color: #6b5a3e; cursor: not-allowed; opacity: 0.75; }

/* ── Info/success/error notices ─────────────────────────────── */
.hff-notice {
    padding: 14px 18px;
    border-radius: 6px;
    margin: 15px 0;
    font-size: 0.95rem;
}
.hff-notice-success { background: #d4edda; color: #155724; border-left: 4px solid #28a745; }
.hff-notice-error   { background: #f8d7da; color: #721c24; border-left: 4px solid #dc3232; }
.hff-notice-info    { background: var(--color-cream, #f5f0eb); color: var(--color-warm-oak, #5D4A37); border-left: 4px solid var(--color-gold, #C5A352); }

/* ── Inactive / completed screens ───────────────────────────── */
.hff-status-screen {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    padding: 50px 40px;
    text-align: center;
}
.hff-status-icon { font-size: 48px; margin-bottom: 15px; }
.hff-status-screen h2 {
    font-family: Georgia, serif;
    font-weight: 400;
    color: var(--color-warm-oak, #5D4A37);
    margin-bottom: 10px;
}
.hff-status-screen p { color: #666; max-width: 380px; margin: 0 auto; }

/* ── Loading spinner ─────────────────────────────────────────── */
.hff-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(0,0,0,0.1);
    border-top-color: var(--color-warm-oak, #5D4A37);
    border-radius: 50%;
    animation: hff-spin 0.8s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

/* ── Animations ──────────────────────────────────────────────── */
@keyframes hff-shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-6px); }
    60%       { transform: translateX(6px); }
}
.hff-btn-shake { animation: hff-shake 0.4s ease; }

@keyframes hff-slide-in {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes hff-spin {
    to { transform: rotate(360deg); }
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 600px) {
    .hff-container { padding: 0 15px; }
    .hff-current-question { padding: 20px; }
    .hff-access-box { padding: 25px 20px; }
    .hff-end-section { padding: 25px 20px; }
    .hff-code-input-group { flex-direction: column; }
    .hff-btn-primary { width: 100%; text-align: center; }
    .hff-btn-shop { width: 100%; }
    .hff-form-group { max-width: 100%; }
    .hff-coupon-code { font-size: 1.4rem; }
    .hff-page { padding-bottom: 55vh; }
}

/* ── Image choice ────────────────────────────────────────────── */
.hff-img-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 4px;
}
@media (max-width: 600px) {
    .hff-img-grid { grid-template-columns: 1fr; }
}

.hff-img-item {
    position: relative;
    border: 3px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}
.hff-img-item:focus-visible { box-shadow: 0 0 0 3px var(--color-gold, #C5A352); }
.hff-img-item.selected {
    border-color: var(--color-warm-oak, #5D4A37);
    box-shadow: 0 0 0 1px var(--color-warm-oak, #5D4A37);
}

.hff-img-thumb {
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: contain;
    display: block;
    pointer-events: none;
    background: #f5f0eb;
}

.hff-img-check {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 22px;
    height: 22px;
    background: var(--color-warm-oak, #5D4A37);
    border-radius: 50%;
    display: none;
}
.hff-img-check::after {
    content: '✓';
    color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 13px;
    line-height: 1;
}
.hff-img-item.selected .hff-img-check { display: block; }

.hff-img-zoom-btn {
    position: absolute;
    bottom: 7px;
    right: 7px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 13px;
    cursor: pointer;
    display: none;
    line-height: 1;
    transition: background 0.1s;
}
.hff-img-zoom-btn:hover { background: rgba(0,0,0,0.78); }
@media (min-width: 601px) {
    .hff-img-item:hover .hff-img-zoom-btn { display: block; }
}

.hff-img-comment-area { margin-top: 14px; }
.hff-img-comment-input {
    width: 100%;
    min-height: 40px;
    padding: 10px 14px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    resize: vertical;
    box-sizing: border-box;
    font-family: inherit;
}
.hff-img-comment-input::placeholder { color: #999; }
.hff-img-comment-input:focus {
    outline: none;
    border-color: var(--color-warm-oak, #5D4A37);
}

/* Lightbox (desktop only trigger, but closes on any device) */
.hff-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.88);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    animation: hff-fade-in 0.15s ease;
}
@keyframes hff-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.hff-lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 6px 40px rgba(0,0,0,0.5);
    pointer-events: none;
}
