/* =============================================================================
   JJ Reviews — Formulář
   Design tokens: Jíme Jinak (DESIGN.md)
   ============================================================================= */

:root {
    --jj-primary:    #95bc4e;
    --jj-secondary:  #FFD166;
    --jj-tertiary:   #06D6A0;
    --jj-neutral:    #F8F9FA;
    --jj-surface:    #FFFFFF;
    --jj-on-surface: #212529;
    --jj-error:      #DC3545;
    --jj-muted:      #6c757d;

    --jj-r-sm:  4px;
    --jj-r-md:  8px;
    --jj-r-lg:  12px;
    --jj-r-full: 9999px;

    --jj-sp-xs: 4px;
    --jj-sp-sm: 8px;
    --jj-sp-md: 16px;
    --jj-sp-lg: 32px;
    --jj-sp-xl: 64px;
}

/* ---- Wrap ---- */

.jj-review-form-wrap {
    max-width: 600px;
    margin: 0 auto;
    font-family: Inter, sans-serif;
    color: var(--jj-on-surface);
}

.jj-review-form-title {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.1;
    color: var(--jj-on-surface);
    margin: 0 0 var(--jj-sp-lg);
}

/* Honeypot — absolutně skrytý */
.jj-hp {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

/* ---- Řádky formuláře ---- */

.jj-form-row {
    display: flex;
    flex-direction: column;
    gap: var(--jj-sp-xs);
    margin-bottom: var(--jj-sp-md);
}

/* Jméno + email vedle sebe */
.jj-form-row-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--jj-sp-md);
    margin-bottom: var(--jj-sp-md);
}

.jj-form-row-pair .jj-form-row {
    margin-bottom: 0;
}

@media (max-width: 480px) {
    .jj-form-row-pair {
        grid-template-columns: 1fr;
    }
}

.jj-form-row label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--jj-on-surface);
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    letter-spacing: 0.01em;
}

.jj-required {
    color: var(--jj-error);
}

.jj-field-note {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--jj-muted);
    letter-spacing: 0;
}

.jj-form-row input[type="text"],
.jj-form-row input[type="email"],
.jj-form-row textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #b0b8c1;
    border-radius: var(--jj-r-md);
    font-size: 1rem;
    font-family: Inter, sans-serif;
    color: var(--jj-on-surface);
    background: var(--jj-surface);
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    -webkit-appearance: none;
    line-height: 1.6;
}

.jj-form-row input::placeholder,
.jj-form-row textarea::placeholder {
    color: #adb5bd;
}

.jj-form-row input:focus,
.jj-form-row textarea:focus {
    outline: none;
    border-color: var(--jj-primary);
    box-shadow: 0 0 0 3px rgba(149, 188, 78, 0.25);
}

.jj-form-row textarea {
    resize: vertical;
    min-height: 130px;
}

/* Chybné pole */
.jj-form-row input.jj-field-error,
.jj-form-row textarea.jj-field-error {
    border-color: var(--jj-error);
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

.jj-stars.jj-field-error label {
    animation: jj-shake 0.35s ease;
}

@keyframes jj-shake {
    0%, 100% { transform: translateX(0); }
    25%       { transform: translateX(-5px); }
    75%       { transform: translateX(5px); }
}

/* ---- Hvězdičky ---- */

.jj-stars {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 0;
}

.jj-stars input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.jj-stars label {
    font-size: 2.2rem;
    color: #dee2e6;
    cursor: pointer;
    transition: color 0.15s, transform 0.1s;
    line-height: 1;
    padding: 0 3px;
    font-weight: 400;
}

/* Vybraná a vše nalevo (= vyšší v RTL flex) */
.jj-stars input:checked ~ label,
.jj-stars label:hover,
.jj-stars label:hover ~ label {
    color: var(--jj-secondary);
}

.jj-stars label:hover {
    transform: scale(1.2);
}

/* ---- Patička formuláře ---- */

.jj-form-footer {
    margin-top: var(--jj-sp-lg);
}

/* ---- Tlačítko — primary styl podle DESIGN.md ---- */

.jj-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    background: var(--jj-primary);
    color: #fff;
    border: none;
    border-radius: var(--jj-r-md);
    font-size: 1rem;
    font-weight: 600;
    font-family: Inter, sans-serif;
    cursor: pointer;
    transition: filter 0.2s, transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(149, 188, 78, 0.35);
    letter-spacing: 0.01em;
}

.jj-submit-btn:hover {
    filter: brightness(0.93);
    box-shadow: 0 4px 16px rgba(149, 188, 78, 0.45);
}

.jj-submit-btn:active {
    transform: translateY(1px);
    filter: brightness(0.88);
}

.jj-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
    filter: none;
}

/* ---- Chybová / info zpráva ---- */

.jj-form-message {
    margin-top: var(--jj-sp-md);
    padding: 10px var(--jj-sp-md);
    border-radius: var(--jj-r-md);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.5;
}

.jj-form-message.error {
    background: #fff5f5;
    border: 1px solid #f5c2c7;
    color: var(--jj-error);
}

/* ---- Úspěšný stav ---- */

.jj-success-msg {
    text-align: center;
    padding: var(--jj-sp-xl) var(--jj-sp-md);
    background: var(--jj-neutral);
    border-radius: var(--jj-r-lg);
}

.jj-success-icon {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: var(--jj-sp-md);
}

.jj-success-msg h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--jj-on-surface);
    margin: 0 0 var(--jj-sp-sm);
    font-family: Inter, sans-serif;
}

.jj-success-msg p {
    color: var(--jj-muted);
    margin: 0;
    font-size: 0.95rem;
}
