/**
 * Strnad E-shop – Sjednocené styly pro produktovou poptávku
 * Design 1:1 s modaly doplňkových služeb (kalkulátor) a formulářem pokladny.
 * Plně samostatné responzivní styly (PC / tablet / mobil) bez závislosti na nekompilovaných Tailwind třídách.
 */

/* --- Inline boxy v kalkulátoru u pole množství --- */
.inq-calc-banner {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 13px 16px;
    border-radius: 16px;
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
@media (min-width: 640px) {
    .inq-calc-banner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
    }
}
.inq-calc-banner--info {
    background-color: #f8fafc;
    border-color: #e2e8f0;
}
.inq-calc-banner__text {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}
.inq-calc-banner__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 1px;
    color: #b45309;
}
.inq-calc-banner--info .inq-calc-banner__icon {
    color: #111827;
}
.inq-calc-banner__msg {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 500;
    color: #451a03;
}
.inq-calc-banner--info .inq-calc-banner__msg {
    color: #374151;
}
.inq-calc-banner__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 9px 18px;
    border-radius: 9999px;
    border: 1px solid #000000;
    background-color: #000000;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.18s ease, transform 0.12s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.inq-calc-banner__btn:hover {
    background-color: #1f2937;
    border-color: #1f2937;
}
.inq-calc-banner__btn:active {
    transform: scale(0.98);
}

/* --- Backdrop & Modal shell (1:1 s modaly doplňkových služeb) --- */
#modal-product-inquiry {
    position: fixed;
    inset: 0;
    z-index: 110;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 8px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
}
#modal-product-inquiry.hidden {
    display: none !important;
}
@media (min-width: 640px) {
    #modal-product-inquiry {
        padding: 16px;
    }
}
@media (min-width: 1024px) {
    #modal-product-inquiry {
        padding: 24px;
    }
}

#modal-product-inquiry *,
#modal-product-inquiry *::before,
#modal-product-inquiry *::after {
    box-sizing: border-box;
}

/* Plovoucí zavírací X tlačítko na pozadí (desktop 1:1 s doplňkovými službami) */
.inq-backdrop-close {
    display: none;
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 120;
    padding: 12px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: color 0.18s ease;
}
.inq-backdrop-close:hover {
    color: #ffffff;
}
@media (min-width: 1024px) {
    .inq-backdrop-close {
        display: block;
    }
}

/* Hlavní karta modalu */
.inq-modal-card {
    position: relative;
    width: 100%;
    max-width: 600px;
    max-height: calc(100dvh - 16px);
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    margin: auto;
    display: flex;
    flex-direction: column;
}
@media (min-width: 640px) {
    .inq-modal-card {
        max-height: calc(100dvh - 32px);
    }
}
@media (min-width: 1024px) {
    .inq-modal-card {
        max-width: 880px;
        height: min(670px, calc(100vh - 48px));
        max-height: calc(100vh - 48px);
    }
}

/* Mobilní / tabletová horní lišta s názvem a zavíracím křížkem */
.inq-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #f3f4f6;
    background-color: #ffffff;
    flex-shrink: 0;
}
@media (min-width: 640px) {
    .inq-mobile-header {
        padding: 16px 24px;
    }
}
@media (min-width: 1024px) {
    .inq-mobile-header {
        display: none;
    }
}
.inq-mobile-header__title {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    color: #111827;
    line-height: 1.25;
}
.inq-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 9999px;
    border: none;
    background-color: #f3f4f6;
    color: #4b5563;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.inq-close-btn:hover {
    background-color: #e5e7eb;
    color: #000000;
}

/* Vnitřní split layout (mobil/tablet: 1 scroll sloupec; desktop: levý souhrn + pravý formulář) */
.inq-modal-layout {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
@media (min-width: 1024px) {
    .inq-modal-layout {
        flex-direction: row;
        overflow: hidden;
    }
}

/* --- Levý panel (produkt + foto + množství + cena) --- */
.inq-col-summary {
    background-color: #f9fafb;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
@media (min-width: 1024px) {
    .inq-col-summary {
        width: 335px;
        border-bottom: none;
        border-right: 1px solid #f3f4f6;
        overflow-y: auto;
    }
}

/* Produktový obrázek nahoře (desktop plná šířka, mobil/tablet kompaktní miniatura) */
.inq-hero-media {
    display: none;
    position: relative;
    width: 100%;
    height: 175px;
    background-color: #e5e7eb;
    overflow: hidden;
    flex-shrink: 0;
}
@media (min-width: 1024px) {
    .inq-hero-media {
        display: block;
    }
}
.inq-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.inq-hero-media__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0) 55%);
    pointer-events: none;
}
.inq-hero-badge {
    position: absolute;
    left: 14px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    padding: 4px 11px;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.94);
    color: #111827;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
}

.inq-summary-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
}
@media (min-width: 640px) {
    .inq-summary-body {
        padding: 18px 24px;
    }
}
@media (min-width: 1024px) {
    .inq-summary-body {
        padding: 20px 22px;
        gap: 16px;
    }
}

/* Mobilní/tabletový kompaktní řádek s fotkou + názvem */
.inq-product-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.inq-product-thumb {
    width: 58px;
    height: 58px;
    border-radius: 12px;
    object-fit: cover;
    background-color: #e5e7eb;
    flex-shrink: 0;
    border: 1px solid #e5e7eb;
}
@media (min-width: 1024px) {
    .inq-product-thumb {
        display: none;
    }
}
.inq-product-meta {
    min-width: 0;
    flex: 1;
}
.inq-kicker {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
    margin-bottom: 3px;
}
.inq-product-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
    word-break: break-word;
}
@media (min-width: 1024px) {
    .inq-product-title {
        font-size: 17px;
    }
}
.inq-product-variant {
    font-size: 13px;
    color: #6b7280;
    margin-top: 3px;
    line-height: 1.35;
}

/* Pill stepper množství (1:1 s kalkulátorem a modalem Upravit šířku) */
.inq-qty-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.inq-qty-label {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
}
.inq-qty-stepper {
    display: inline-flex;
    align-items: center;
    width: 100%;
    max-width: 240px;
    padding: 4px;
    border: 1px solid #d1d5db;
    border-radius: 9999px;
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.inq-qty-stepper:focus-within {
    border-color: #000000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.14);
}
.inq-qty-btn {
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    border: none;
    background: transparent;
    color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.15s ease;
}
.inq-qty-btn:hover {
    background-color: #f3f4f6;
}
.inq-qty-input-wrap {
    position: relative;
    flex: 1;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}
.inq-qty-input {
    width: 100%;
    height: 100%;
    border: none !important;
    background: transparent !important;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    padding: 0 28px 0 8px !important;
    outline: none !important;
    box-shadow: none !important;
    -moz-appearance: textfield;
}
.inq-qty-input::-webkit-outer-spin-button,
.inq-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.inq-qty-unit {
    position: absolute;
    right: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    pointer-events: none;
}
.inq-qty-hint {
    margin: 2px 0 0 2px;
    font-size: 12px;
    color: #92400e;
    line-height: 1.35;
}

/* Souhrnový box (1:1 s "Náhled řezu" v modalu Upravit šířku) */
.inq-preview-box {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 13px 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.inq-preview-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
}
.inq-preview-row--divider {
    padding-top: 10px;
    border-top: 1px solid #f3f4f6;
}
.inq-preview-label {
    color: #6b7280;
    font-weight: 500;
}
.inq-preview-val {
    color: #111827;
    font-weight: 700;
    text-align: right;
}
.inq-services-val {
    font-size: 12px;
    color: #374151;
    line-height: 1.4;
    margin-top: 2px;
}

.inq-summary-reassurance {
    display: none;
    padding: 14px 22px;
    border-top: 1px solid #e5e7eb;
    font-size: 12px;
    line-height: 1.45;
    color: #6b7280;
    background-color: #f9fafb;
}
@media (min-width: 1024px) {
    .inq-summary-reassurance {
        display: block;
    }
}

/* --- Pravý panel (formulář 1:1 s pokladnou) --- */
.inq-col-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    background-color: #ffffff;
    position: relative;
}
@media (min-width: 1024px) {
    .inq-col-form {
        min-height: 0;
        overflow: hidden;
    }
}

.inq-form-scroll {
    padding: 18px 16px 24px;
    flex: 1;
}
@media (min-width: 640px) {
    .inq-form-scroll {
        padding: 20px 24px 24px;
    }
}
@media (min-width: 1024px) {
    .inq-form-scroll {
        padding: 26px 30px 104px;
        overflow-y: auto;
        min-height: 0;
    }
}

.inq-desktop-heading {
    display: none;
    margin-bottom: 18px;
}
@media (min-width: 1024px) {
    .inq-desktop-heading {
        display: block;
    }
}
.inq-desktop-heading h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}
.inq-desktop-heading p {
    margin: 5px 0 0;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.45;
}

.inq-form-stack {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.inq-field-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 6px 4px;
}
.inq-req {
    color: #ef4444;
}

/* Přepínač typu zákazníka (Soukromá osoba / Firma / Profesionální podlahář) */
.inq-type-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}
@media (min-width: 440px) {
    .inq-type-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
.inq-type-option {
    position: relative;
    display: block;
    cursor: pointer;
    margin: 0;
}
.inq-type-radio {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}
.inq-type-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 44px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid #9ca3af;
    background-color: #ffffff;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    transition: all 0.16s ease;
    user-select: none;
}
.inq-type-option:hover .inq-type-pill {
    border-color: #4b5563;
    color: #111827;
}
.inq-type-radio:focus-visible + .inq-type-pill {
    outline: 2px solid #000000;
    outline-offset: 2px;
}
.inq-type-radio:checked + .inq-type-pill {
    background-color: #000000;
    border-color: #000000;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
}

/* Inputy 1:1 s pokladnou (border-gray-400, rounded-xl, focus:ring-2 focus:ring-black) */
.inq-input,
.inq-textarea {
    display: block;
    width: 100%;
    padding: 11px 15px;
    background-color: #ffffff;
    border: 1px solid #9ca3af;
    border-radius: 12px;
    color: #111827;
    font-size: 16px;
    line-height: 1.4;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
@media (min-width: 640px) {
    .inq-input,
    .inq-textarea {
        font-size: 15px;
    }
}
.inq-input:hover,
.inq-textarea:hover {
    border-color: #6b7280;
}
.inq-input:focus,
.inq-textarea:focus {
    border-color: #000000;
    box-shadow: 0 0 0 2px #000000;
}
.inq-input.is-invalid,
.inq-textarea.is-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25) !important;
}
.inq-textarea {
    resize: vertical;
    min-height: 76px;
}

/* Grid polí */
.inq-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
@media (min-width: 640px) {
    .inq-grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 16px;
    }
}

/* Firemní údaje (shodný styl jako #company_fields v pokladně) */
.inq-company-box {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
}
.inq-company-box.hidden {
    display: none !important;
}

/* intl-tel-input sjednocení s pokladnou */
#modal-product-inquiry .iti {
    width: 100%;
    display: block;
}
#modal-product-inquiry .iti__country-container {
    padding: 2px;
}
#modal-product-inquiry .iti__selected-country {
    border-radius: 10px 0 0 10px;
}
#modal-product-inquiry .iti__selected-dial-code {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}
#modal-product-inquiry .iti__tel-input {
    width: 100%;
}

.inq-field-error {
    margin: 6px 0 0 4px;
    font-size: 12px;
    font-weight: 500;
    color: #dc2626;
}
.inq-error-banner {
    padding: 12px 14px;
    border-radius: 12px;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
}
.inq-gdpr-note {
    margin: 0;
    font-size: 11.5px;
    line-height: 1.45;
    color: #6b7280;
}
.inq-gdpr-note a {
    color: #374151;
    text-decoration: underline;
}
.inq-gdpr-note a:hover {
    color: #000000;
}

/* Spodní akční lišta (1:1 s modaly doplňkových služeb – pevná dole na mobilu/tabletu i desktopu) */
.inq-modal-footer {
    position: sticky;
    bottom: 0;
    flex-shrink: 0;
    display: grid;
    grid-template-columns: 1fr 1.65fr;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid #f3f4f6;
    background-color: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 30;
}
.inq-modal-footer.hidden {
    display: none !important;
}
@media (min-width: 640px) {
    .inq-modal-footer {
        gap: 12px;
        padding: 14px 24px;
    }
}
@media (min-width: 1024px) {
    .inq-modal-footer {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        border-top: none;
        padding: 28px 30px 22px;
        gap: 14px;
        background: linear-gradient(to top, #ffffff 68%, rgba(255, 255, 255, 0.88) 85%, rgba(255, 255, 255, 0) 100%);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        pointer-events: none;
    }
    .inq-modal-footer > button {
        pointer-events: auto;
    }
}

.inq-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 18px;
    border-radius: 9999px;
    border: 1px solid #e5e7eb;
    background-color: #ffffff;
    color: #4b5563;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.16s ease;
}
.inq-btn-secondary:hover {
    color: #000000;
    background-color: #f9fafb;
    border-color: #d1d5db;
}

.inq-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 22px;
    border-radius: 9999px;
    border: 1px solid #000000;
    background-color: #000000;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.16);
    transition: background-color 0.16s ease, opacity 0.16s ease;
}
.inq-btn-primary:hover {
    background-color: #1f2937;
    border-color: #1f2937;
}
.inq-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Stav po odeslání */
.inq-success-view {
    padding: 36px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 360px;
}
.inq-success-view.hidden {
    display: none !important;
}
.inq-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 9999px;
    background-color: #dcfce7;
    color: #16a34a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.inq-success-kicker {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #15803d;
}
.inq-success-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #111827;
}
.inq-success-msg {
    margin: 0;
    max-width: 420px;
    font-size: 14px;
    line-height: 1.55;
    color: #4b5563;
}
.inq-success-cta {
    margin-top: 8px;
    padding: 12px 32px;
    width: auto;
}
