/*
 * YHS Custom Features
 * Sale badge / Coupon notice / Trust badges / Inquiry popup
 * Compatible with liyhs001 theme (html.dark-mode)
 */

/* ============================================================
   0. Sale badge — top-LEFT, eye-catching pill style
   ============================================================ */

/* 1. Move the block wrapper to top-left, shrink to content width */
.wp-block-woocommerce-product-sale-badge {
    position: absolute !important;
    top: 4px !important;
    left: 4px !important;
    right: auto !important;
    bottom: auto !important;
    width: fit-content !important;
    z-index: 5 !important;
}

/* 2. Override ALL alignment variants incl. WordPress core alignright */
.wc-block-components-product-sale-badge--align-right,
.wc-block-components-product-sale-badge--align-center,
.wc-block-components-product-sale-badge--align-left,
.wc-block-components-product-sale-badge.alignright,
.wc-block-components-product-sale-badge.aligncenter {
    right: auto !important;
    left: 0 !important;
    top: 0 !important;
    float: none !important;
    margin-left: 0 !important;
}

/* 3. Visual style on the component container */
.wc-block-components-product-sale-badge {
    background: linear-gradient(135deg, #ff5e3a, #e03a1f) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 6px 14px !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    line-height: 1 !important;
    box-shadow: 0 4px 12px rgba(245,81,58,.55) !important;
    display: inline-block !important;
    white-space: nowrap !important;
}

/* 4. Text inside badge */
.wc-block-components-product-sale-badge__text {
    color: #fff !important;
    font-size: inherit !important;
    font-weight: inherit !important;
}

/* 5. Hide sale badge on single product detail page */
.single-product .wp-block-woocommerce-product-sale-badge,
.single-product span.onsale {
    display: none !important;
}

/* 6. Older grid block + classic WooCommerce fallback */
.wc-block-grid .wc-block-grid__product-onsale,
.wc-block-grid__product-image .wc-block-grid__product-onsale,
span.onsale {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    right: auto !important;
    background: linear-gradient(135deg, #ff5e3a, #e03a1f) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 6px 14px !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    box-shadow: 0 4px 12px rgba(245,81,58,.55) !important;
    z-index: 5 !important;
}

/* ============================================================
   1. Product page trust badges (below Tags) — icon-card style
   ============================================================ */
.yhscf-product-trust {
    margin: 16px 0 0;
    padding: 0;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255,255,255,.03);
}
html:not(.dark-mode) .yhscf-product-trust {
    border-color: #e5e7eb;
    background: #fafafa;
}

.yhscf-pt-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-bottom: 1px solid rgba(255,255,255,.07);
    transition: background .15s;
}
.yhscf-pt-item:last-child { border-bottom: none; }
html:not(.dark-mode) .yhscf-pt-item { border-color: #e5e7eb; }
.yhscf-pt-item:hover { background: rgba(255,255,255,.05); }
html:not(.dark-mode) .yhscf-pt-item:hover { background: #f3f4f6; }

.yhscf-pt-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.yhscf-pt-icon svg { width: 18px; height: 18px; }

.yhscf-pt-icon--shield  { background: rgba(245,81,58,.18);  color: #F5513A; }
.yhscf-pt-icon--box     { background: rgba(72,187,120,.18); color: #48bb78; }
.yhscf-pt-icon--truck   { background: rgba(99,179,237,.18); color: #63b3ed; }
.yhscf-pt-icon--globe   { background: rgba(183,148,246,.18);color: #b794f6; }
.yhscf-pt-icon--support { background: rgba(246,173,85,.18); color: #f6ad55; }

.yhscf-pt-item > span {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    color: rgba(255,255,255,.82);
    flex: 1;
    min-width: 0;
}
html:not(.dark-mode) .yhscf-pt-item > span { color: #374151; }


/* ============================================================
   0b. Review form — star rating + photo upload
   ============================================================ */

/* Hide WooCommerce's default star/radio area */
.comment-form-rating .stars,
.comment-form-rating select#rating {
    display: none !important;
}

/* Custom star row */
.yhscf-star-row {
    display: flex;
    gap: 4px;
    margin: 6px 0 14px;
}
.yhscf-star {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 34px;
    line-height: 1;
    padding: 0 1px;
    color: rgba(255,255,255,.15);
    transition: color .12s, transform .1s;
    will-change: transform;
}
html:not(.dark-mode) .yhscf-star { color: #d1d5db; }
.yhscf-star.is-on {
    color: #F5C518;
    text-shadow: 0 0 8px rgba(245,197,24,.5);
}
.yhscf-star:hover { transform: scale(1.2); }

/* Upload label */
.yhscf-upload-label {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,.75);
    margin: 0 0 8px;
}
html:not(.dark-mode) .yhscf-upload-label { color: #374151; }
.yhscf-upload-label span { font-weight: 400; color: rgba(255,255,255,.4); font-size: 12px; }
html:not(.dark-mode) .yhscf-upload-label span { color: #9ca3af; }

/* Drop zone */
.yhscf-upload-zone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 2px dashed rgba(255,255,255,.15);
    border-radius: 12px;
    padding: 22px 16px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    user-select: none;
    outline: none;
}

/* Transparent file input covers the entire zone — handles native click + drag */
.yhscf-file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}
html:not(.dark-mode) .yhscf-upload-zone { border-color: #d1d5db; background: #fafafa; }
.yhscf-upload-zone:hover,
.yhscf-upload-zone.is-over {
    border-color: #F5513A;
    background: rgba(245,81,58,.06);
}
.yhscf-upload-zone.is-full { cursor: default; opacity: .5; pointer-events: none; }
.yhscf-upload-zone > svg { opacity: .4; }

.yhscf-upload-prompt {
    margin: 2px 0 0;
    font-size: 13px;
    color: rgba(255,255,255,.5);
}
html:not(.dark-mode) .yhscf-upload-prompt { color: #6b7280; }
.yhscf-upload-prompt span { color: #F5513A; font-weight: 600; text-decoration: underline; }

.yhscf-upload-hint {
    margin: 0;
    font-size: 11px;
    color: rgba(255,255,255,.3);
}
html:not(.dark-mode) .yhscf-upload-hint { color: #9ca3af; }

/* Preview grid */
.yhscf-preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.yhscf-prev-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background: #2a2a35 center/cover no-repeat;
    border: 1px solid rgba(255,255,255,.1);
    overflow: visible;
    flex-shrink: 0;
}
html:not(.dark-mode) .yhscf-prev-item { background: #e5e7eb; border-color: #d1d5db; }
.yhscf-prev-item--spin::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    background: rgba(0,0,0,.35);
}
.yhscf-prev-item--spin::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 20px; height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: yhs-spin .7s linear infinite;
}
.yhscf-prev-del {
    position: absolute;
    top: -6px; right: -6px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    border: 2px solid #18181d;
    font-size: 14px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    padding: 0;
    font-weight: 700;
    transition: background .15s;
    z-index: 2;
}
.yhscf-prev-del:hover { background: #dc2626; }

/* Review images shown below review text */
.yhscf-review-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.yhscf-review-img-link { display: block; }
.yhscf-review-img-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.1);
    transition: opacity .15s;
}
.yhscf-review-img-thumb:hover { opacity: .85; }
html:not(.dark-mode) .yhscf-review-img-thumb { border-color: #e5e7eb; }

/* ── Payment & Security (below trust badges) ── */
.yhscf-payment-security {
    margin: 14px 0 0;
}
.yhscf-payment-box {
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 10px;
    padding: 13px 16px;
    background: rgba(255,255,255,.04);
}
html:not(.dark-mode) .yhscf-payment-box {
    border-color: #d1d5db;
    background: #fff;
}
.yhscf-payment-title {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,.9);
    margin: 0 0 11px;
    letter-spacing: .2px;
}
html:not(.dark-mode) .yhscf-payment-title { color: #111827; }
.yhscf-card-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Real logo chips */
.yhscf-pay-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 4px 8px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,.08);
    flex-shrink: 0;
}
.yhscf-pay-logo--wide { padding: 4px 10px; }
.yhscf-pay-logo img {
    display: block;
    height: 24px;
    width: auto;
    object-fit: contain;
}
.yhscf-payment-note {
    margin: 10px 0 0;
    font-size: 12px;
    line-height: 1.55;
    color: rgba(255,255,255,.4);
}
html:not(.dark-mode) .yhscf-payment-note { color: #6b7280; }

/* ============================================================
   1b. Coupon error popup
   ============================================================ */
.yhscf-coupon-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.yhscf-coupon-modal {
    position: relative;
    background: #1c1c22;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 18px;
    padding: 32px 28px 24px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 24px 60px rgba(0,0,0,.5);
    animation: yhscf-pop-in .28s cubic-bezier(.34,1.26,.64,1);
}
html:not(.dark-mode) .yhscf-coupon-modal {
    background: #fff;
    border-color: #e5e7eb;
}

@keyframes yhscf-pop-in {
    from { transform: scale(.88) translateY(16px); opacity: 0; }
    to   { transform: scale(1)   translateY(0);    opacity: 1; }
}

.yhscf-coupon-modal__icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(245,81,58,.14);
    color: #F5513A;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.yhscf-coupon-modal__body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 800;
    color: #f2f2f2;
    line-height: 1.3;
}
html:not(.dark-mode) .yhscf-coupon-modal__body h3 { color: #111827; }

.yhscf-coupon-modal__body p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255,255,255,.6);
}
html:not(.dark-mode) .yhscf-coupon-modal__body p { color: #6b7280; }
.yhscf-coupon-modal__body p strong { color: #f2f2f2; }
html:not(.dark-mode) .yhscf-coupon-modal__body p strong { color: #111827; }

.yhscf-coupon-modal__close {
    position: absolute;
    top: 14px; right: 16px;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    border: none;
    color: #9ca3af;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.yhscf-coupon-modal__close:hover { background: #F5513A; color: #fff; }

.yhscf-coupon-modal__foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.yhscf-coupon-modal__shop {
    font-size: 13px;
    color: rgba(255,255,255,.45);
    text-decoration: underline;
    cursor: pointer;
}
html:not(.dark-mode) .yhscf-coupon-modal__shop { color: #9ca3af; }
.yhscf-coupon-modal__shop:hover { color: #F5513A; }

.yhscf-coupon-modal__ok {
    padding: 10px 26px;
    background: #F5513A;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, transform .1s;
    font-family: inherit;
}
.yhscf-coupon-modal__ok:hover {
    background: #d94430;
    transform: translateY(-1px);
}

/* ============================================================
   2. Coupon notice bar
   ============================================================ */
.yhs-coupon-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #92400e;
    font-weight: 500;
}
.yhs-coupon-notice--unlocked {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #14532d;
}
.yhs-coupon-notice__icon { font-size: 18px; flex-shrink: 0; }

html.dark-mode .yhs-coupon-notice {
    background: rgba(254,215,170,.1);
    border-color: rgba(254,215,170,.3);
    color: #fed7aa;
}
html.dark-mode .yhs-coupon-notice--unlocked {
    background: rgba(187,247,208,.1);
    border-color: rgba(187,247,208,.3);
    color: #bbf7d0;
}


/* ============================================================
   2. Trust badges
   ============================================================ */
.yhs-trust-badges {
    display: flex;
    gap: 0;
    background: var(--wp--preset--color--base, #f8f9fa);
    border: 1px solid var(--wp--preset--color--gray-100, #e9ecef);
    border-radius: 8px;
    overflow: hidden;
    margin: 20px 0;
    font-family: inherit;
}

.yhs-trust-badges--horizontal { flex-direction: row; flex-wrap: nowrap; }
.yhs-trust-badges--horizontal .yhs-badge {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 18px 12px;
    border-right: 1px solid var(--wp--preset--color--gray-100, #e9ecef);
}
.yhs-trust-badges--horizontal .yhs-badge:last-child { border-right: none; }

.yhs-trust-badges--vertical { flex-direction: column; }
.yhs-trust-badges--vertical .yhs-badge {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--wp--preset--color--gray-100, #e9ecef);
}
.yhs-trust-badges--vertical .yhs-badge:last-child { border-bottom: none; }
.yhs-trust-badges--vertical .yhs-badge__icon { margin-bottom: 0; margin-top: 2px; }

.yhs-trust-badges--grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.yhs-trust-badges--grid .yhs-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 18px 12px;
    border-right: 1px solid var(--wp--preset--color--gray-100, #e9ecef);
    border-bottom: 1px solid var(--wp--preset--color--gray-100, #e9ecef);
}

.yhs-badge__icon { width: 36px; height: 36px; color: #F5513A; flex-shrink: 0; margin-bottom: 10px; }
.yhs-badge__icon svg { width: 100%; height: 100%; }
.yhs-badge__text { display: flex; flex-direction: column; gap: 3px; }
.yhs-badge__en { font-size: 13px; font-weight: 600; color: var(--wp--preset--color--contrast, #1a202c); margin: 0; line-height: 1.4; }
.yhs-badge__zh { font-size: 11px; color: var(--wp--preset--color--gray-200, #718096); margin: 0; line-height: 1.4; }

@media (max-width: 767px) {
    .yhs-trust-badges--horizontal { flex-wrap: wrap; }
    .yhs-trust-badges--horizontal .yhs-badge {
        flex: 1 1 calc(50% - 1px);
        border-bottom: 1px solid var(--wp--preset--color--gray-100, #e9ecef);
    }
    .yhs-trust-badges--horizontal .yhs-badge:nth-child(even) { border-right: none; }
    .yhs-badge__en { font-size: 12px; }
}


/* ============================================================
   3. Inquiry popup
   ============================================================ */

/* ── Order pending/failed alert ─── */
.yhscf-order-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(245,81,58,.1);
    border: 1px solid rgba(245,81,58,.35);
    border-radius: 10px;
    padding: 14px 18px;
    margin: 20px 0;
    color: #f0f0f0;
    font-size: 14px;
    line-height: 1.5;
    flex-wrap: wrap;
}
html:not(.dark-mode) .yhscf-order-alert { color: #1a1a1a; background: #fff5f3; }
.yhscf-order-alert svg { flex-shrink: 0; color: #F5513A; }
.yhscf-order-alert span { flex: 1; min-width: 0; }
.yhscf-order-alert__btn {
    flex-shrink: 0;
    padding: 8px 18px;
    background: #F5513A;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
}
.yhscf-order-alert__btn:hover { background: #d94430; }

/* Ensure FAB shows above WooCommerce checkout/payment overlays */
.woocommerce-checkout .yhs-inquiry-fab,
.woocommerce-cart .yhs-inquiry-fab {
    z-index: 99999;
}
.woocommerce-checkout .yhs-inquiry-overlay,
.woocommerce-cart .yhs-inquiry-overlay {
    z-index: 100000;
}

/* ── FAB button ─── */
.yhs-inquiry-fab {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 9998;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 22px 0 18px;
    height: 50px;
    background: #F5513A;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(245,81,58,.5);
    transition: transform .2s, box-shadow .2s, background .2s;
    letter-spacing: .4px;
    white-space: nowrap;
}
.yhs-inquiry-fab svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.yhs-inquiry-fab:hover {
    background: #d94430;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(245,81,58,.55);
}
.yhs-inquiry-fab:active { transform: translateY(0); }

/* ── Overlay ─── */
.yhs-inquiry-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, .65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s cubic-bezier(.4,0,.2,1);
}
.yhs-inquiry-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

/* ── Modal card ─── */
.yhs-inquiry-modal {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 620px;
    max-height: 92vh;
    overflow-y: auto;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .35);
    transform: translateY(24px) scale(.96);
    transition: transform .32s cubic-bezier(.34,1.26,.64,1);
}
html.dark-mode .yhs-inquiry-modal {
    background: #1c1c21;
    border: 1px solid rgba(255,255,255,.09);
}
.yhs-inquiry-overlay.is-open .yhs-inquiry-modal {
    transform: translateY(0) scale(1);
}

/* ── Modal header strip ─── */
.yhs-inquiry-modal__head {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 28px 32px 24px;
    border-bottom: 1px solid rgba(0,0,0,.07);
}
html.dark-mode .yhs-inquiry-modal__head { border-color: rgba(255,255,255,.08); }

.yhs-inquiry-modal__icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: rgba(245,81,58,.12);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #F5513A;
}
.yhs-inquiry-modal__icon svg { width: 26px; height: 26px; }

.yhs-inquiry-modal__title {
    flex: 1;
    min-width: 0;
}
.yhs-inquiry-modal__title h2 {
    margin: 0 0 3px;
    font-size: 19px;
    font-weight: 800;
    color: #111;
    line-height: 1.25;
    letter-spacing: -.2px;
}
html.dark-mode .yhs-inquiry-modal__title h2 { color: #f2f2f2; }
.yhs-inquiry-modal__title p {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}
html.dark-mode .yhs-inquiry-modal__title p { color: #9ca3af; }

/* ── Close button ─── */
.yhs-inquiry-close {
    position: absolute;
    top: 18px;
    right: 20px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.06);
    border: none;
    border-radius: 50%;
    color: #6b7280;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: background .15s, color .15s;
}
html.dark-mode .yhs-inquiry-close { background: rgba(255,255,255,.1); color: #9ca3af; }
.yhs-inquiry-close:hover { background: #F5513A; color: #fff; }

/* ── Form body ─── */
.yhs-inquiry-body { padding: 28px 32px 32px; }

.yhs-form-row { margin-bottom: 18px; }
.yhs-form-row--2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.yhs-form-group { display: flex; flex-direction: column; gap: 6px; }

.yhs-form-group label {
    font-size: 12.5px;
    font-weight: 700;
    color: #374151;
    letter-spacing: .3px;
    text-transform: uppercase;
}
html.dark-mode .yhs-form-group label { color: #9ca3af; }
.yhs-form-group label span { color: #F5513A; margin-left: 1px; }

.yhs-form-group input,
.yhs-form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: #111827;
    background: #f9fafb;
    transition: border-color .18s, box-shadow .18s, background .18s;
    box-sizing: border-box;
    outline: none;
    resize: vertical;
}
html.dark-mode .yhs-form-group input,
html.dark-mode .yhs-form-group textarea {
    background: #111115;
    color: #f0f0f0;
    border-color: rgba(255,255,255,.12);
}
.yhs-form-group input:focus,
.yhs-form-group textarea:focus {
    border-color: #F5513A;
    background: #fff;
    box-shadow: 0 0 0 3.5px rgba(245,81,58,.14);
}
html.dark-mode .yhs-form-group input:focus,
html.dark-mode .yhs-form-group textarea:focus {
    background: #18181d;
}
.yhs-form-group input.is-invalid,
.yhs-form-group textarea.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,.12);
}

/* ── Footer ─── */
.yhs-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
    flex-wrap: wrap;
}
.yhs-form-note {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #9ca3af;
}
.yhs-form-note svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ── Submit button ─── */
.yhs-inquiry-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 30px;
    background: #F5513A;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: .3px;
    transition: background .18s, transform .15s, box-shadow .18s;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(245,81,58,.35);
}
.yhs-inquiry-submit:hover {
    background: #d94430;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(245,81,58,.45);
}
.yhs-inquiry-submit:disabled {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ── Result message ─── */
.yhs-inquiry-result {
    margin-top: 18px;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    line-height: 1.5;
}
.yhs-inquiry-result.is-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}
.yhs-inquiry-result.is-error {
    background: #fff5f5;
    border: 1px solid #fecaca;
    color: #991b1b;
}
html.dark-mode .yhs-inquiry-result.is-success {
    background: rgba(187,247,208,.1);
    border-color: rgba(187,247,208,.3);
    color: #86efac;
}
html.dark-mode .yhs-inquiry-result.is-error {
    background: rgba(254,202,202,.1);
    border-color: rgba(254,202,202,.3);
    color: #fca5a5;
}

/* ── Loading spinner ─── */
.yhs-submit-loading::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: yhs-spin .7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}
@keyframes yhs-spin { to { transform: rotate(360deg); } }

/* ── Responsive ─── */
@media (max-width: 599px) {
    .yhs-inquiry-fab span { display: none; }
    .yhs-inquiry-fab {
        width: 54px;
        height: 54px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
        bottom: 20px;
        right: 20px;
    }
    .yhs-inquiry-modal { border-radius: 16px; }
    .yhs-inquiry-modal__head { padding: 22px 20px 18px; }
    .yhs-inquiry-body { padding: 22px 20px 26px; }
    .yhs-form-row--2col { grid-template-columns: 1fr; gap: 0; }
    .yhs-form-row--2col .yhs-form-group:first-child { margin-bottom: 18px; }
    .yhs-form-footer { flex-direction: column; align-items: stretch; }
    .yhs-inquiry-submit { justify-content: center; width: 100%; }
}
