.ycqa-modal, .ycqa-toast {
    --ycqa-surface: #241f20; --ycqa-ink: #fff8f0; --ycqa-muted: #c6b9b3;
    --ycqa-border: #655451; --ycqa-accent: #bf2330;
    font-family: "KalamehFaNum-Medium", Tahoma, sans-serif;
    font-size: 15px; line-height: 1.7; color: var(--ycqa-ink); direction: rtl;
    box-sizing: border-box;
}
.ycqa-modal *, .ycqa-toast * { box-sizing: border-box; }
body.ycqa-modal-open { overflow: hidden; }
.ycqa-modal[hidden], .ycqa-toast[hidden], .ycqa-modal [hidden] { display: none !important; }
dialog.ycqa-modal, div.ycqa-modal {
    position: fixed; inset: 0; z-index: 2147483000; width: 100%; max-width: none;
    height: 100%; height: 100dvh; max-height: none; margin: 0; border: 0;
    padding: 24px; background: transparent; overflow: hidden;
}
.ycqa-modal[open] { display: grid; place-items: center; }
.ycqa-modal::backdrop { background: rgba(10, 6, 6, .72); }
div.ycqa-modal { background: rgba(10, 6, 6, .72); }
.ycqa-panel {
    width: min(600px, 100%); max-height: 100%; min-height: 0;
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--ycqa-surface); border: 1px solid var(--ycqa-border);
    border-radius: 24px; box-shadow: 0 30px 100px #0008;
    animation: ycqa-enter .16s ease-out;
}
.ycqa-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--ycqa-border); }
.ycqa-header small { display: block; color: #e8baa0; font-size: 12px; }
.ycqa-header h2 { margin: 2px 0 0; font: inherit; font-size: 20px; font-weight: 700; color: var(--ycqa-ink); }
.ycqa-modal button.ycqa-close { display: grid; place-items: center; flex: 0 0 44px; height: 44px; width: 44px; margin: 0; padding: 0; color: var(--ycqa-ink); background: #ffffff0a; border: 1px solid var(--ycqa-border); border-radius: 50%; cursor: pointer; }
.ycqa-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.ycqa-content { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 22px; scrollbar-width: thin; scrollbar-color: #99817a transparent; }
.ycqa-summary { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 18px; align-items: center; margin-bottom: 24px; }
.ycqa-modal img.ycqa-image { width: 96px; height: 112px; object-fit: contain; background: #fff; border-radius: 14px; }
.ycqa-modal .ycqa-name { margin: 0 0 8px; color: var(--ycqa-ink); font: inherit; font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.ycqa-price, .ycqa-price .price { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: 4px 9px; direction: ltr; text-align: right; font-size: 17px; font-weight: 700; color: var(--ycqa-ink); }
.ycqa-price .price { width: 100%; }
.ycqa-price ins { background: transparent; text-decoration: none; }
.ycqa-price del { color: var(--ycqa-muted); font-size: 14px; font-weight: 400; }
.ycqa-price .amount { white-space: nowrap; }
.ycqa-price .screen-reader-text { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip-path: inset(50%) !important; white-space: nowrap !important; }
.ycqa-stock { margin: 7px 0 0; font-size: 13px; color: #b9d8b0; }
.ycqa-stock.is-out { color: #ffb5ae; }
.ycqa-field { min-width: 0; padding: 0; border: 0; margin: 0 0 22px; }
.ycqa-field:last-child { margin-bottom: 0; }
.ycqa-field legend { display: block; float: none; padding: 0; margin: 0 0 10px; color: var(--ycqa-ink); font: inherit; font-size: 16px; font-weight: 700; }
.ycqa-options { display: flex; flex-wrap: wrap; gap: 8px; }
.ycqa-field:not(.ycqa-brewing) .ycqa-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); }
.ycqa-modal button.ycqa-option { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 15px; margin: 0; color: var(--ycqa-ink); background: #302829; border: 1px solid #86706b; border-radius: 11px; font: inherit; font-size: 14px; line-height: 1.55; text-align: center; cursor: pointer; transition: background .12s, border-color .12s; }
.ycqa-modal button.ycqa-option:hover:not(:disabled) { background: #483233; border-color: #f6beb2; }
.ycqa-modal button.ycqa-option[aria-pressed="true"] { color: #fff; background: #692630; border-color: #ff9f99; box-shadow: inset 0 0 0 1px #ff9f99; }
.ycqa-modal button.ycqa-option:disabled { opacity: .45; cursor: not-allowed; text-decoration: line-through; }
.ycqa-modal button.ycqa-option[aria-pressed="true"]:disabled { text-decoration: none; }
.ycqa-hint, .ycqa-help { color: var(--ycqa-muted); font-size: 13px; margin: 0 0 12px; }
.ycqa-brewing .ycqa-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ycqa-modal .ycqa-brewing button.ycqa-option { padding: 9px 10px; }
.ycqa-footer { flex-shrink: 0; padding: 14px 22px 20px; border-top: 1px solid var(--ycqa-border); background: var(--ycqa-surface); }
.ycqa-error { color: #ffb5ae; font-size: 14px; margin: 0 0 12px; }
.ycqa-error:empty { display: none; }
.ycqa-quantity-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 14px; }
.ycqa-quantity-row > label { color: var(--ycqa-ink); font-size: 15px; font-weight: 700; white-space: nowrap; }
.ycqa-modal .quantity.rushweb-quantity-controls {
    display: inline-grid; grid-template-areas: "plus input minus" "message message message";
    grid-template-columns: 46px 54px 46px; align-items: center; direction: rtl;
    margin: 0; border: 1px solid #86706b; border-radius: 12px; background: #302829;
    color: var(--ycqa-ink); vertical-align: middle;
}
.ycqa-modal .quantity.rushweb-quantity-controls::before { display: none !important; content: none !important; }
.ycqa-modal .quantity.rushweb-quantity-controls input.qty {
    grid-area: input; width: 54px; min-width: 54px; max-width: 54px; min-height: 44px;
    margin: 0; padding: 0 4px !important; border-block: 0 !important;
    border-inline: 1px solid #6f5c58 !important; border-radius: 0; background: transparent !important;
    box-shadow: none !important; appearance: textfield; color: var(--ycqa-ink); font: inherit;
    font-size: 15px; font-weight: 700; direction: ltr; text-align: center;
}
.ycqa-modal .quantity.rushweb-quantity-controls input.qty::-webkit-inner-spin-button,
.ycqa-modal .quantity.rushweb-quantity-controls input.qty::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.ycqa-modal .quantity .rushweb-qty-button {
    display: inline-flex; align-items: center; justify-content: center; min-width: 46px; min-height: 44px;
    margin: 0; padding: 0 !important; border: 0 !important; border-radius: 0 !important;
    background: transparent !important; box-shadow: none !important; color: var(--ycqa-ink) !important;
    font: inherit; font-size: 20px; line-height: 1; cursor: pointer; touch-action: manipulation;
    transition: opacity .15s ease, background .15s ease;
}
.ycqa-modal .quantity .rushweb-qty-button--plus { grid-area: plus; }
.ycqa-modal .quantity .rushweb-qty-button--minus { grid-area: minus; }
.ycqa-modal .quantity .rushweb-qty-button:hover:not(:disabled) { background: #ffffff0c !important; opacity: .8; }
.ycqa-modal .quantity .rushweb-qty-button:disabled,
.ycqa-modal .quantity .rushweb-qty-button[aria-disabled="true"] { opacity: .36; cursor: not-allowed; }
.ycqa-modal .quantity .rushweb-qty-limit-message {
    grid-area: message; max-width: 154px; margin: 5px 0 -1px; padding: 5px 8px;
    border-top: 1px solid #6f5c58; color: var(--ycqa-muted); font-size: 11px;
    line-height: 1.5; direction: rtl; text-align: center;
}
.ycqa-modal .quantity .rushweb-qty-limit-message[hidden] { display: none !important; }
.ycqa-modal button.ycqa-add { width: 100%; min-height: 50px; padding: 12px 18px; margin: 0; background: var(--ycqa-accent); color: #fff; border: 1px solid #e84650; border-radius: 13px; font: inherit; font-weight: 700; cursor: pointer; }
.ycqa-modal button.ycqa-add:hover:not(:disabled) { background: #a21925; }
.ycqa-modal button.ycqa-add:disabled { background: #4b3c3e; border-color: #69575a; color: #c8babc; cursor: not-allowed; }
.ycqa-modal button:focus-visible, .ycqa-modal input:focus-visible, .ycqa-toast a:focus-visible, .ycqa-toast button:focus-visible { position: relative; z-index: 1; outline: 3px solid #ffd29c; outline-offset: 3px; }
.ycqa-loading { min-height: 220px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--ycqa-muted); }
.ycqa-spinner { display: inline-block; width: 22px; height: 22px; flex: 0 0 22px; border: 2px solid var(--ycqa-border); border-top-color: #ff878e; border-radius: 50%; animation: ycqa-spin .8s linear infinite; }
.ycqa-busy { opacity: .55; cursor: wait; }
.ycqa-toast { position: fixed; z-index: 2147483001; right: 20px; bottom: 24px; width: min(400px, calc(100vw - 32px)); padding: 17px; background: #24372c; border: 1px solid #849789; border-radius: 16px; box-shadow: 0 12px 50px #0005; }
.ycqa-toast.is-error { background: #492529; border-color: #b6757c; }
.ycqa-toast p { margin: 0 0 12px; color: #fff; }
.ycqa-toast > div { display: flex; flex-wrap: wrap; gap: 10px; }
.ycqa-toast a, .ycqa-toast button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin: 0; padding: 7px 14px; color: #fff; background: #ffffff08; border: 1px solid #b5c3b9; border-radius: 9px; text-decoration: none; font: inherit; font-size: 13px; cursor: pointer; }
@keyframes ycqa-spin { to { transform: rotate(360deg); } }
@keyframes ycqa-enter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 767px) {
    dialog.ycqa-modal, div.ycqa-modal { padding: 0; }
    .ycqa-modal[open] { place-items: end stretch; }
    .ycqa-panel { width: 100%; max-height: 92%; max-height: 92dvh; border-radius: 22px 22px 0 0; border-bottom: 0; }
    .ycqa-header { position: relative; padding: 20px 16px 12px; }
    .ycqa-header::before { content: ''; position: absolute; width: 42px; height: 4px; background: #8e7874; border-radius: 99px; top: 7px; left: calc(50% - 21px); }
    .ycqa-header h2 { font-size: 18px; }
    .ycqa-content { padding: 18px 16px; }
    .ycqa-modal .ycqa-field:not(.ycqa-brewing) button.ycqa-option { padding-inline: 8px; }
    .ycqa-summary { grid-template-columns: 78px minmax(0, 1fr); gap: 13px; margin-bottom: 20px; }
    .ycqa-modal img.ycqa-image { width: 78px; height: 92px; }
    .ycqa-modal .ycqa-name { font-size: 16px; }
    .ycqa-price, .ycqa-price .price { font-size: 15px; }
    .ycqa-footer { padding: 12px 16px max(16px, env(safe-area-inset-bottom)); }
    .ycqa-quantity-row { gap: 10px; }
    .ycqa-quantity-row > label { font-size: 14px; }
    .ycqa-modal .quantity.rushweb-quantity-controls { grid-template-columns: 44px 50px 44px; }
    .ycqa-modal .quantity.rushweb-quantity-controls input.qty { width: 50px; min-width: 50px; max-width: 50px; }
    .ycqa-modal .quantity .rushweb-qty-button { min-width: 44px; }
    .ycqa-toast { right: 16px; bottom: max(20px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .ycqa-panel, .ycqa-spinner { animation: none; } .ycqa-modal button.ycqa-option { transition: none; } }
