/* =============================================================================
 * style.css — Rezervācijas pieteikuma forma
 * Zīmola tonis: #ff4b00
 * Paredzēts iegulšanai <iframe>, tāpēc stili ir lokalizēti zem .reservation-wrap
 * ========================================================================== */

:root {
    --brand:            #ff4b00;
    --brand-dark:       #d83e00;
    --brand-darker:     #b33300;
    --brand-soft:       #fff1ea;
    --brand-soft-2:     #ffe3d6;

    --text:             #1f2328;
    --text-muted:       #6b7280;
    --border:           #d9dde3;
    --border-focus:     #ffb489;
    --bg:               #ffffff;
    --bg-page:          #f4f5f7;
    --bg-soft:          #fafbfc;

    --danger:           #d92d20;
    --danger-soft:      #fef3f2;
    --success:          #067647;
    --success-soft:     #ecfdf3;

    --radius:           8px;
    --radius-sm:        6px;
    --shadow-sm:        0 1px 2px rgba(16, 24, 40, .06);
    --transition:       140ms ease;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg-page);
    -webkit-font-smoothing: antialiased;
}

/* Apmales / konteiners -------------------------------------------------------- */
.reservation-wrap {
    max-width: 860px;
    margin: 0 auto;
    padding: 24px 20px 40px;
    background: var(--bg);
    min-height: 100%;
}

.reservation-header {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--brand-soft-2);
}
.reservation-header h1 {
    margin: 0 0 6px;
    font-size: 1.6rem;
    color: var(--brand);
    letter-spacing: -0.01em;
}
.reservation-header p {
    margin: 0;
    color: var(--text-muted);
    font-size: .95rem;
}

/* Sadaļas (fieldset) --------------------------------------------------------- */
.form-section {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 18px 22px;
    margin: 0 0 20px;
    background: var(--bg-soft);
    box-shadow: var(--shadow-sm);
}
.form-section legend {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
}
.legend-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-size: .85rem;
    font-weight: 700;
    flex-shrink: 0;
}
.subsection-title {
    margin: 18px 0 12px;
    font-weight: 700;
    font-size: .95rem;
    color: var(--text);
    padding-top: 14px;
    border-top: 1px dashed var(--border);
}

/* Režģi ---------------------------------------------------------------------- */
.grid { display: grid; gap: 14px 16px; }
.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) {
    .grid-2 { grid-template-columns: 1fr; }
}

/* Lauki ---------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; }
.field label {
    font-weight: 600;
    font-size: .9rem;
    margin-bottom: 6px;
    color: var(--text);
}
.req { color: var(--brand); font-weight: 700; }

.field-hint {
    font-size: .8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: .95rem;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
    appearance: none;
}
textarea { resize: vertical; min-height: 90px; }

select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 34px;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--border-focus);
}

input.readonly {
    background: #f0f1f3;
    color: var(--text-muted);
    font-weight: 700;
    cursor: not-allowed;
}
input.readonly-cost {
    color: var(--brand);
    font-size: 1.05rem;
}

/* Iezīmes rūtiņa ------------------------------------------------------------- */
.field-check { margin-bottom: 4px; }
.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 600;
    font-size: .92rem;
    cursor: pointer;
    user-select: none;
}
.checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    accent-color: var(--brand);
    flex-shrink: 0;
    cursor: pointer;
}

/* Pazīmes / kļūdas ----------------------------------------------------------- */
.field-error {
    display: none;
    font-size: .82rem;
    color: var(--danger);
    margin-top: 5px;
}
.field.has-error .field-error { display: block; }
.field.has-error input,
.field.has-error select,
.field.has-error textarea {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px var(--danger-soft);
}

/* Trauksmes (alert) ---------------------------------------------------------- */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-weight: 600;
    font-size: .95rem;
    border: 1px solid transparent;
}
.alert[hidden] { display: none; }
.alert-success {
    background: var(--success-soft);
    color: var(--success);
    border-color: #a9efc5;
}
.alert-error {
    background: var(--danger-soft);
    color: var(--danger);
    border-color: #fecdca;
}
.alert-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: .8rem;
    color: #fff;
    flex-shrink: 0;
}
.alert-success .alert-icon { background: var(--success); }
.alert-error   .alert-icon { background: var(--danger); }

/* Poga ----------------------------------------------------------------------- */
.form-actions {
    margin-top: 8px;
    display: flex;
    justify-content: center;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn-primary {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
    color: #fff;
    background: var(--brand);
    box-shadow: 0 2px 8px rgba(255, 75, 0, .28);
}
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:active { transform: translateY(1px); background: var(--brand-darker); }
.btn-primary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--border-focus);
}
.btn[disabled], .btn.is-loading {
    opacity: .7;
    cursor: progress;
}
.btn-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, .5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
.btn.is-loading .btn-spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Kājene --------------------------------------------------------------------- */
.reservation-footer {
    margin-top: 24px;
    text-align: center;
    font-size: .8rem;
    color: var(--text-muted);
}

/* Pieejamība ----------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

