/* Front-end formulare suite (odstoupeni od smlouvy, GDPR zadost, dotaz na zbozi). */
.shaim-withdrawal-form,
.shaim-gdpr-request-form,
.shaim-dotaz-form {
    max-width: 560px;
    margin: 1.5em 0;
}

.shaim-withdrawal-form p,
.shaim-gdpr-request-form p,
.shaim-dotaz-form p {
    margin: 0 0 1.1em;
}

.shaim-withdrawal-form label,
.shaim-gdpr-request-form label,
.shaim-dotaz-form label {
    display: block;
    font-weight: 600;
    margin-bottom: .35em;
}

.shaim-withdrawal-form input[type="text"],
.shaim-withdrawal-form input[type="email"],
.shaim-withdrawal-form textarea,
.shaim-gdpr-request-form input[type="email"],
.shaim-gdpr-request-form select,
.shaim-dotaz-form input[type="text"],
.shaim-dotaz-form input[type="email"],
.shaim-dotaz-form input[type="tel"],
.shaim-dotaz-form textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: .6em .75em;
    border: 1px solid #c7c7cc;
    border-radius: 6px;
    font-size: 1em;
    line-height: 1.4;
    background: #fff;
    color: #1d1d1f;
}

.shaim-withdrawal-form textarea,
.shaim-dotaz-form textarea {
    min-height: 96px;
    resize: vertical;
}

.shaim-withdrawal-form input:focus,
.shaim-withdrawal-form textarea:focus,
.shaim-gdpr-request-form input:focus,
.shaim-gdpr-request-form select:focus,
.shaim-dotaz-form input:focus,
.shaim-dotaz-form textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgb(34 113 177 / 20%);
}

/* Souhlasovy radek s checkboxem na jednom radku. */
.shaim-withdrawal-form input[type="checkbox"] {
    width: auto;
    margin-right: .5em;
    vertical-align: middle;
}

.shaim-withdrawal-form button,
.shaim-gdpr-request-form button,
.shaim-dotaz-form button {
    display: inline-block;
    padding: .75em 1.6em;
    background: #2271b1;
    color: #fff;
    border: 0;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease;
}

.shaim-withdrawal-form button:hover,
.shaim-gdpr-request-form button:hover,
.shaim-dotaz-form button:hover {
    background: #185a92;
}

.shaim-withdrawal-form .woocommerce-message,
.shaim-withdrawal-form .woocommerce-error,
.shaim-gdpr-request-form .woocommerce-message,
.shaim-gdpr-request-form .woocommerce-error,
.shaim-dotaz .woocommerce-message,
.shaim-dotaz .woocommerce-error {
    margin-bottom: 1.2em;
}

/* Odstoupeni od smlouvy: vyber polozek + mnozstvi (krok 2). */
.shaim-wd-vse-toggle {
    display: flex;
    align-items: center;
    gap: .5em;
    padding: .6em .75em;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 6px;
    margin: 0 0 1em;
    cursor: pointer;
    font-weight: 600;
    color: #0f766e;
}

.shaim-wd-help {
    color: #6b7280;
    font-size: .92em;
    margin: 0 0 1em;
}

.shaim-wd-items {
    list-style: none;
    padding: 0;
    margin: 0 0 1.4em;
}

.shaim-wd-item {
    display: flex;
    align-items: center;
    gap: .9em;
    padding: .8em 0;
    border-bottom: 1px solid #f0f0f1;
}

.shaim-wd-item:last-child {
    border-bottom: none;
}

.shaim-wd-pick-wrap {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
}

.shaim-wd-pick-empty {
    width: 22px;
}

.shaim-wd-item-info {
    flex: 1 1 auto;
    min-width: 0;
}

.shaim-wd-item-name {
    display: block;
    font-weight: 600;
    color: #1d1d1f;
}

.shaim-wd-flag {
    display: inline-block;
    margin-top: .3em;
    padding: .1em .6em;
    background: #d1fae5;
    color: #065f46;
    border-radius: 10px;
    font-size: .8em;
    font-weight: 600;
}

.shaim-wd-flag-blok {
    background: #fee2e2;
    color: #991b1b;
}

.shaim-wd-item-done,
.shaim-wd-item-blok {
    opacity: .6;
}

.shaim-wd-item-qty {
    flex: 0 0 auto;
    text-align: right;
    font-size: .9em;
}

.shaim-wd-qty-line {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .5em;
    margin-bottom: .25em;
}

.shaim-wd-qty-line:last-child {
    margin-bottom: 0;
}

.shaim-wd-qty-cap {
    color: #6b7280;
}

.shaim-wd-qty-val {
    font-weight: 700;
    background: #f3f4f6;
    padding: .1em .5em;
    border-radius: 10px;
    min-width: 1.8em;
    text-align: center;
}

.shaim-withdrawal-form input[type="number"].shaim-wd-qty-input {
    width: 64px;
    max-width: 64px;
    text-align: center;
    padding: .35em;
}

/* Dotaz na zbozi: blok s tlacitkem na strance produktu. */
.shaim-dotaz {
    margin: 1em 0;
    clear: both;
}

.shaim-dotaz-form {
    margin-top: 1em;
}

.shaim-dotaz-form .required,
.shaim-price-match-form .required {
    color: #b32d2e;
}

/* ---------------------------------------------------------------------------
 * Sdileny modal pro front-end formulare (Dotaz na zbozi, Nasli jste lepsi
 * cenu?, Datum doruceni). Self-contained - nezavisi na Bootstrapu tematu;
 * otevirani/zavirani resi vanilla JS (assets/js/shaim-modal.js). Vychazi ze
 * vzhledu popup modalu (assets/js/popup.js) kvuli konzistenci.
 * ------------------------------------------------------------------------- */
.shaim-modal-overlay {
    position: fixed;
    inset: 0;
    display: none; /* skryty dokud JS neprida .shaim-modal-open */
    align-items: flex-start;
    justify-content: center;
    padding: 5vh 16px;
    overflow-y: auto;
    background: rgb(0 0 0 / 50%);
    z-index: 100000;
}

.shaim-modal-overlay.shaim-modal-open {
    display: flex;
}

/* Pojistka proti tematu, ktere by prepsalo display u skryteho overlaye. */
.shaim-modal-overlay[hidden] {
    display: none;
}

.shaim-modal-box {
    position: relative;
    width: 100%;
    max-width: 540px;
    margin: auto;
    background: #fff;
    color: #1d1d1f;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgb(0 0 0 / 25%);
    animation: shaim-modal-in .15s ease;
}
@keyframes shaim-modal-in {
    from {
        transform: translateY(-12px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.shaim-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 1em 1.2em;
    border-bottom: 1px solid #e5e5e7;
}

.shaim-modal-title {
    margin: 0;
    font-size: 1.15em;
    font-weight: 600;
}

/* Ikonove zaviraci tlacitko (x) v hlavicce modalu. Footer tlacitko "Zavrit"
 * ma navic tridu .button (sekundarni tlacitko) a nechava si normalni sirku -
 * jinak by se text "Zavrit" orezal na "Z". */
.shaim-modal-close:not(.button) {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 24px;
    line-height: 1;
    color: #1d1d1f;
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
}

.shaim-modal-close:not(.button):hover {
    background: #f1f1f3;
}

/* Footer "Zavrit" jako sekundarni tlacitko (kdyz tema nestyluje .button). */
.shaim-modal-footer .button.shaim-modal-close {
    width: auto;
    min-width: 0;
    height: auto;
    padding: 0.6em 1.2em;
    font-size: inherit;
    line-height: normal;
}

.shaim-modal-body {
    padding: 1.2em;
}

/* Konzistentni vzhled VSECH formularovych poli uvnitr modalu (Dotaz, Nasli jste
 * levneji, ...) - nezavisle na tride formulare a na tematu. */
.shaim-modal-body label {
    display: block;
    font-weight: 600;
    margin-bottom: .35em;
}

.shaim-modal-body p {
    margin: 0 0 1.1em;
}

/* stylelint-disable no-descending-specificity -- modal pole zamerne prebijeji formularove styly poradim v souboru; selektory maji stejnou specificitu (.shaim-dotaz-form/.shaim-price-match-form ziji uvnitr modalu), reorder by obratil kaskadu = vizualni regrese */
.shaim-modal-body input[type="text"],
.shaim-modal-body input[type="email"],
.shaim-modal-body input[type="tel"],
.shaim-modal-body input[type="url"],
.shaim-modal-body input[type="number"],
.shaim-modal-body textarea,
.shaim-modal-body select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: .6em .75em;
    border: 1px solid #c7c7cc;
    border-radius: 6px;
    font-size: 1em;
    line-height: 1.4;
    background: #fff;
    color: #1d1d1f;
}

.shaim-modal-body textarea {
    min-height: 96px;
    resize: vertical;
}
/* stylelint-enable no-descending-specificity */

.shaim-modal-body input:focus,
.shaim-modal-body textarea:focus,
.shaim-modal-body select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgb(34 113 177 / 20%);
}

.shaim-modal-body input[type="checkbox"] {
    width: auto;
    margin-right: .5em;
    vertical-align: middle;
}

.shaim-modal-footer {
    display: flex;
    flex-wrap: wrap;
    gap: .6em;
    justify-content: flex-end;
    padding: 1em 1.2em;
    border-top: 1px solid #e5e5e7;
}

/* Modalni varianta formularu nema vlastni okraje/sirku - drzi je modal box. */
.shaim-modal-body .shaim-dotaz-form,
.shaim-modal-body .shaim-price-match-form {
    max-width: 100%;
    margin: 0;
}

/* Inline notice uvnitr modalu (uspech/chyba odeslani). */
.shaim-modal-notice {
    margin: 0 0 1em;
    padding: .7em .9em;
    border-radius: 6px;
    font-size: .95em;
}

.shaim-modal-notice--ok {
    color: #0a5d29;
    background: #e4f5ea;
    border: 1px solid #a6dab9;
}

.shaim-modal-notice--err {
    color: #8a1f1f;
    background: #fbe6e6;
    border: 1px solid #e0a3a3;
}

.shaim-modal-trigger {
    cursor: pointer;
}

/* Cervene oramovani nevyplneneho povinneho pole (parita PS *_invalid). */
.shaim-field-invalid {
    border-color: #b32d2e !important;
    box-shadow: 0 0 0 2px rgb(179 45 46 / 18%) !important;
}

/* Datum doruceni: blok s tlacitkem + modalni tabulka dopravcu. */
.shaim-delivery-date {
    margin: 1em 0;
    clear: both;
}

.shaim-dd-trigger {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
}

.shaim-dd-modal-table {
    width: 100%;
    border-collapse: collapse;
}

.shaim-dd-modal-table td {
    padding: .35em .8em .35em 0;
    border: 0;
    vertical-align: top;
}

.shaim-dd-modal-table .shaim-dd-when {
    white-space: nowrap;
}

.shaim-dd-note {
    font-size: .85em;
    opacity: .7;
    margin: .8em 0 0;
}

.shaim-dd-trigger .shaim-dd-icon {
    display: inline-flex;
    vertical-align: middle;
    margin-right: .35em;
}

/* ---------------------------------------------------------------------------
 * Naseptavac adresy (Mapy.cz) v pokladne. Knihovna autoComplete.js obali pole
 * ulice vlastnim .autoComplete_wrapper, ktery je display:inline-block a vstup ma
 * pevnou sirku 370px - pole pak v pokladne vypada uzke a seznam navrhu se
 * neroztahne. Parita s PS modulem shaim_naseptavac
 * (.autoComplete_wrapper.shaim_naseptavac): wrapper i vstup roztahneme na plnou
 * sirku adresniho pole a seznam navrhu zvetsime/zcitelnime. Trida
 * .shaim-naseptavac se na wrapper pridava v JS po inicializaci knihovny
 * (shaim-naseptavac.js).
 * ------------------------------------------------------------------------- */
.autoComplete_wrapper.shaim-naseptavac {
    display: block;
    position: relative;
    width: 100%;
}

.autoComplete_wrapper.shaim-naseptavac > input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Seznam navrhu: plna sirka pole, citelna vyska a odsazeni polozek. */
.autoComplete_wrapper.shaim-naseptavac > ul {
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    max-height: 320px;
    overflow-y: auto;
    box-sizing: border-box;
    z-index: 100000; /* nad pripadnymi prvky pokladny/tematu */
}

.autoComplete_wrapper.shaim-naseptavac > ul > li {
    padding: 8px 12px;
    line-height: 1.35;
    white-space: normal;
}

/* Logo "Powered by Mapy.cz" pod seznamem at nezabira celou sirku radku navrhu. */
.autoComplete_wrapper.shaim-naseptavac > ul .shaim-mapy-logo {
    padding: 4px 12px;
}

/* Reklamace - per-item vyber polozek (sdili vzhled s odstoupenim). */
.shaim-rk-vse-toggle {
    display: block;
    margin: 0 0 1em;
    font-weight: 600;
    color: #0f766e;
}

.shaim-rk-items {
    list-style: none;
    padding: 0;
    margin: 0 0 1.4em;
}

.shaim-rk-item {
    display: flex;
    align-items: center;
    gap: .9em;
    padding: .8em 0;
    border-bottom: 1px solid #f0f0f1;
}

.shaim-rk-item:last-child {
    border-bottom: none;
}

.shaim-rk-pick-wrap {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
}

.shaim-rk-item-info {
    flex: 1 1 auto;
    min-width: 0;
}

.shaim-rk-item-name {
    display: block;
    font-weight: 600;
    color: #1d1d1f;
}

.shaim-rk-item-qty {
    flex: 0 0 auto;
    text-align: right;
    font-size: .9em;
}

.shaim-rk-qty-line {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .5em;
    margin-bottom: .25em;
}

.shaim-rk-qty-line:last-child {
    margin-bottom: 0;
}

.shaim-rk-qty-cap {
    color: #6b7280;
}

.shaim-rk-qty-val {
    font-weight: 700;
    background: #f3f4f6;
    padding: .1em .5em;
    border-radius: 10px;
    min-width: 1.8em;
    text-align: center;
}

.shaim-reklamace-form input[type="number"].shaim-rk-qty-input {
    width: 64px;
    max-width: 64px;
    text-align: center;
    padding: .35em;
}
