/* =========================================================
   Objednávkový formulář Pergoly – form-style.css  v1.2
   Manrope font | bílé tlačítko | inline checkbox
   ========================================================= */

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

#obf-form-wrapper {
    font-family: 'Manrope', sans-serif;
    max-width: 860px;
    margin: 0 auto;
    padding: 0 16px 40px;
    color: #1a1a2e;
}

/* ── Notices ─────────────────────────────────────────── */
.obf-notice {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
    font-family: 'Manrope', sans-serif;
}
.obf-success { background: #e6f9f0; color: #1a7c4a; border: 1px solid #a8e6c5; }
.obf-error   { background: #fff0f0; color: #c0392b; border: 1px solid #f5a7a7; }

/* ── Sections ────────────────────────────────────────── */
.obf-section {
    background: #fff;
    border: 1px solid #e8e8f0;
    border-radius: 16px;
    padding: 28px 28px 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.obf-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f8;
}

/* ── Grid ────────────────────────────────────────────── */
.obf-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.obf-col-2 { grid-column: span 2; }
@media (max-width: 600px) {
    .obf-grid-2 { grid-template-columns: 1fr; }
    .obf-col-2  { grid-column: span 1; }
}

/* ── Fields ──────────────────────────────────────────── */
.obf-field label {
    display: block;
    font-weight: 600;
    font-size: .82rem;
    color: #555;
    margin-bottom: 6px;
    font-family: 'Manrope', sans-serif;
}
.obf-field small { font-weight: 400; color: #999; }
.obf-req { color: #e74c3c; }

.obf-field input[type="text"],
.obf-field input[type="email"],
.obf-field input[type="tel"],
.obf-field input[type="number"],
.obf-field input[type="url"],
.obf-field select,
.obf-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #dde0ec;
    border-radius: 10px;
    font-family: 'Manrope', sans-serif;
    font-size: .93rem;
    background: #fafbff;
    box-sizing: border-box;
    transition: border-color .2s, box-shadow .2s;
    color: #1a1a2e;
}
.obf-field select {
    -webkit-appearance: none;
    appearance: none;
    padding: 12px 40px 12px 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}
.obf-field textarea {
    resize: vertical;
    min-height: 90px;
}
.obf-field input:focus,
.obf-field select:focus,
.obf-field textarea:focus {
    outline: none;
    border-color: #6c63ff;
    box-shadow: 0 0 0 3px rgba(108,99,255,.13);
    background: #fff;
}

/* ── Checkbox ────────────────────────────────────────── */
.obf-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    font-size: .93rem;
    font-family: 'Manrope', sans-serif;
}
.obf-checkbox-label input[type="checkbox"] {
    width: 17px; height: 17px;
    accent-color: #6c63ff;
    cursor: pointer;
    flex-shrink: 0;
}

/* ── Stejná délka checkbox ───────────────────────────── */
.obf-same-length-wrap {
    margin-bottom: 16px;
}
.obf-same-length-wrap .obf-checkbox-label {
    font-size: .88rem;
    color: #555;
}

/* ── Tabulka polí – LAYOUT ───────────────────────────── */
.obf-pole-header,
.obf-pole-row {
    display: grid;
    grid-template-columns: 36px 1fr 1.6fr 1fr;
    gap: 10px;
    align-items: center;
}
.obf-pole-header {
    font-size: .75rem;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f8;
    margin-bottom: 4px;
}
.obf-pole-row {
    padding: 7px 0;
    border-bottom: 1px solid #f4f4fa;
}
.obf-pole-row:last-child { border-bottom: none; }

.obf-row-cislo {
    font-weight: 700;
    color: #1f1914;
    font-size: .88rem;
    text-align: center;
}

/* Inline inputs v řádku */
.obf-pole-row input[type="number"] {
    width: 100%;
    padding: 7px 10px;
    border: 1.5px solid #dde0ec;
    border-radius: 8px;
    font-family: 'Manrope', sans-serif;
    font-size: .88rem;
    background: #fafbff;
    box-sizing: border-box;
    transition: border-color .2s;
    color: #1a1a2e;
}
.obf-pole-row input[type="number"]:focus {
    outline: none;
    border-color: #6c63ff;
    box-shadow: 0 0 0 3px rgba(108,99,255,.12);
    background: #fff;
}

/* Šířka dole – input a checkbox VEDLE SEBE */
.obf-dole-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}
.obf-dole-inline input[type="number"] {
    flex: 1;
    min-width: 0;
}
.obf-chk-inline-label {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    font-size: .75rem;
    color: #888;
    cursor: pointer;
    font-family: 'Manrope', sans-serif;
    font-weight: 500;
    flex-shrink: 0;
}
.obf-chk-inline-label input[type="checkbox"] {
    width: 13px; height: 13px;
    accent-color: #6c63ff;
    cursor: pointer;
}

.obf-delka-cell {
    display: flex;
    align-items: center;
}

@media (max-width: 600px) {
    .obf-pole-header {
        display: none;
    }
    .obf-pole-row {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 12px 0;
        border-bottom: 1px solid #f4f4fa;
        position: relative;
    }
    .obf-pole-row:last-child {
        border-bottom: none;
    }
    .obf-row-cislo {
        text-align: left;
        font-size: 1rem;
        font-weight: 700;
        color: #1f1914;
        margin-bottom: 4px;
    }
    .obf-col-sirka:nth-child(2)::before {
        content: 'Šířka nahoře (cm) *';
        font-size: .75rem;
        font-weight: 700;
        color: #999;
        text-transform: uppercase;
        letter-spacing: .05em;
        display: block;
        margin-bottom: 4px;
    }
    .obf-dole-inline {
        display: grid;
        grid-template-areas:
            "label label"
            "input checkbox";
        grid-template-columns: 1fr auto;
        gap: 4px 10px;
        width: 100%;
    }
    .obf-dole-inline::before {
        grid-area: label;
        content: 'Šířka dole (cm)';
        font-size: .75rem;
        font-weight: 700;
        color: #999;
        text-transform: uppercase;
        letter-spacing: .05em;
    }
    .obf-dole-inline input[type="number"] {
        grid-area: input;
        width: 100% !important;
        flex: none !important;
        box-sizing: border-box;
    }
    .obf-dole-inline .obf-chk-inline-label {
        grid-area: checkbox;
        display: flex !important;
        flex-direction: row;
        align-items: center;
        gap: 6px;
        font-size: .85rem;
        color: #555;
        font-weight: 500;
        white-space: nowrap;
        margin-top: 0;
        margin-left: 0;
    }
    .obf-dole-inline .obf-chk-inline-label span {
        display: inline !important;
    }
    .obf-delka-cell {
        display: flex !important;
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
        width: 100%;
    }
    .obf-delka-cell::before {
        content: 'Délka (cm) *';
        font-size: .75rem;
        font-weight: 700;
        color: #999;
        text-transform: uppercase;
        letter-spacing: .05em;
        display: block;
    }
    .obf-delka-cell input[type="number"] {
        width: 100%;
        box-sizing: border-box;
    }
    .obf-col-sirka,
    .obf-dole-inline,
    .obf-delka-cell {
        width: 100%;
    }
    .obf-col-sirka input[type="number"],
    .obf-dole-inline input[type="number"],
    .obf-delka-cell input[type="number"] {
        width: 100%;
        box-sizing: border-box;
    }
    #obf-form-wrapper {
        padding-left: 0;
        padding-right: 0;
    }
    .obf-section {
        padding: 20px 16px;
    }
}

/* ── Dropzone ─────────────────────────────────────────── */
.obf-dropzone {
    border: 2px dashed #c8c8e8;
    border-radius: 12px;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    background: #fafaff;
    transition: background .2s, border-color .2s;
    position: relative;
}
.obf-dropzone:hover,
.obf-dz-over { background: #f0eeff; border-color: #6c63ff; }
.obf-dropzone input[type="file"] { position: absolute; opacity: 0; width: 0; height: 0; }
.obf-dz-icon { font-size: 2rem; display: block; margin-bottom: 8px; }
.obf-dz-text { color: #999; font-size: .88rem; }

.obf-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    font-size: .86rem;
    color: #444;
    background: #f0eeff;
    padding: 8px 12px;
    border-radius: 8px;
    font-family: 'Manrope', sans-serif;
}
.obf-file-remove {
    background: none; border: none;
    color: #c0392b; cursor: pointer;
    font-size: 1rem; line-height: 1;
    margin-left: auto; padding: 0;
}

/* ── Submit – BÍLÉ tlačítko ──────────────────────────── */
.obf-submit-wrap {
    text-align: center;
    margin-top: 8px;
}
#obf-submit {
    background: #fff;
    color: #1f1914;
    border: none;
    border-radius: 50px;
    width: 100%;
    padding: 14px 48px;
    font-family: 'Manrope', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: .03em;
    transition: transform .15s, background .15s;
    display: block;
    box-shadow: none !important;
    outline: none;
    -webkit-appearance: none;
}
#obf-submit:hover {
    background: #f0eeff;
    color: #1f1914;
    transform: translateY(-2px);
}
#obf-submit:disabled { opacity: .65; cursor: not-allowed; transform: none; }

/* ── Select override – vynutí správné zobrazení bez ohledu na WP téma ── */
#obf-form-wrapper select,
#obf-form-wrapper .obf-field select {
    -webkit-appearance: none !important;
    appearance: none !important;
    padding: 12px 40px 12px 14px !important;
    height: auto !important;
    min-height: 44px !important;
    line-height: 1.5 !important;
    font-size: .93rem !important;
    font-family: 'Manrope', sans-serif !important;
    white-space: normal !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-color: #fafbff !important;
}

#obf-form-wrapper select {
    height: unset !important;
    max-height: none !important;
    min-height: 0 !important;
    line-height: normal !important;
    padding-top: 11px !important;
    padding-bottom: 11px !important;
}
