/* Melika Core — orders: thank-you page, orders list, one order, card-to-card receipt. */

.mel-od {
	--mel-ink: #12261c; --mel-deep: #0c2419; --mel-jade: #1f5a40; --mel-jade-2: #2a7352;
	--mel-gold: #d4a441; --mel-gold-soft: #ecc875; --mel-mist: #eef2ea; --mel-paper: #f7f9f5;
	--mel-muted: #5c6b63; --mel-line: rgba(18, 38, 28, 0.1); --mel-danger: #b4432a; --mel-amber: #a86a12;
	display: flex; flex-direction: column; gap: 16px; width: 100%;
	font-family: "Vazirmatn", Tahoma, sans-serif !important; color: var(--mel-ink); line-height: 1.8; text-align: start;
}
.mel-od *, .mel-od *::before, .mel-od *::after { box-sizing: border-box; }
.mel-od h1, .mel-od h2, .mel-od h3, .mel-od b, .mel-od strong, .mel-od button, .mel-od input { font-family: inherit !important; }
.mel-od p { margin: 0; }
.mel-od dl, .mel-od dd, .mel-od ul, .mel-od ol { margin: 0; padding: 0; list-style: none; }
.mel-od img { display: block; max-width: 100%; height: auto; }

/* Buttons (the thank-you page sits outside the panel, so they are defined here too) */
.mel-od .mel-pbtn, .mel-od button.mel-pbtn { display: inline-flex !important; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px !important; border: 1.5px solid transparent !important; border-radius: 14px !important; font-size: 14px !important; font-weight: 700 !important; line-height: 1 !important; text-decoration: none !important; white-space: nowrap; cursor: pointer; text-transform: none !important; letter-spacing: 0 !important; transition: transform .2s, box-shadow .2s, background .2s; }
.mel-od .mel-pbtn:hover { transform: translateY(-1px); }
.mel-od .mel-pbtn--gold { background: linear-gradient(180deg, #ecc875, #d4a441) !important; color: #0c2419 !important; box-shadow: 0 12px 22px -14px rgba(212, 164, 65, .9) !important; }
.mel-od .mel-pbtn--jade { background: linear-gradient(180deg, #2a7352, #1f5a40) !important; color: #fff !important; box-shadow: 0 12px 22px -14px rgba(31, 90, 64, .9) !important; }
.mel-od .mel-pbtn--ghost { background: #fff !important; border-color: var(--mel-line) !important; color: var(--mel-ink) !important; }
.mel-od .mel-pbtn--sm { min-height: 36px; padding: 0 14px !important; font-size: 12.5px !important; border-radius: 11px !important; }
.mel-od .mel-pbtn[disabled] { opacity: .7; cursor: progress; transform: none; }

/* Cards */
.mel-od-card, .mel-od-hero { position: relative; padding: 20px; border: 1px solid var(--mel-line); border-radius: 22px !important; background: #fff; box-shadow: 0 18px 40px -32px rgba(12, 36, 25, .45); }
.mel-od-h { margin: 0 0 14px !important; font-size: 15px !important; font-weight: 800 !important; color: var(--mel-ink) !important; }
.mel-od-muted { color: var(--mel-muted); font-size: 13.5px; }
.mel-od-grid { display: grid; gap: 16px; align-items: start; }
.mel-od-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (min-width: 900px) { .mel-od-grid { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); } }

/* Status pill */
.mel-od-pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 99px; font-size: 12px; font-weight: 800; white-space: nowrap; background: var(--mel-mist); color: var(--mel-jade); }
.mel-od-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.mel-od-pill.is-act { background: #fff4dc; color: var(--mel-amber); }
.mel-od-pill.is-act::before { animation: mel-od-blink 1.6s infinite; }
.mel-od-pill.is-wait { background: #eef3fb; color: #3a5b8c; }
.mel-od-pill.is-bad { background: #fbece8; color: var(--mel-danger); }
@keyframes mel-od-blink { 50% { opacity: .25; } }

/* Hero (one order + thank-you) */
.mel-od-hero { overflow: hidden; background: linear-gradient(160deg, #fff 55%, #f6f2e4); }
.mel-od-hero.is-ok { background: linear-gradient(160deg, #fff 55%, #e9f2ec); }
.mel-od-hero.is-bad { background: linear-gradient(160deg, #fff 55%, #fbefeb); }
.mel-od-hero__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mel-od-hero__top small { display: block; color: var(--mel-muted); font-size: 12px; }
.mel-od-hero__top h2 { margin: 0 !important; font-size: 24px !important; font-weight: 900 !important; line-height: 1.3 !important; color: var(--mel-ink) !important; }
.mel-od-hero > p { margin: 10px 0 0; color: var(--mel-muted); font-size: 13.5px; }
.mel-od-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 16px !important; }
.mel-od-facts > div { padding: 10px 12px; border-radius: 14px; background: rgba(238, 242, 234, .75); }
.mel-od-facts dt { color: var(--mel-muted); font-size: 11.5px; font-weight: 500; }
.mel-od-facts dd { font-size: 13.5px; font-weight: 800; }
.mel-od-hero:not(.mel-ty__hero) .mel-od-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 380px) { .mel-od-hero:not(.mel-ty__hero) .mel-od-facts dd { font-size: 12px; } }
@media (min-width: 700px) { .mel-ty__hero .mel-od-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Steps */
.mel-od-steps { counter-reset: s; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 18px !important; }
.mel-od-steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: var(--mel-muted); font-size: 11.5px; font-weight: 600; line-height: 1.5; }
.mel-od-steps li::before { content: ""; position: absolute; top: 14px; inset-inline-end: 50%; width: 100%; height: 2px; background: var(--mel-line); z-index: 0; }
.mel-od-steps li:first-child::before { display: none; }
.mel-od-steps li.is-done::before, .mel-od-steps li.is-now::before { background: var(--mel-jade); }
.mel-od-steps i { position: relative; z-index: 1; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 2px solid var(--mel-line); font-style: normal; font-size: 12px; font-weight: 800; }
.mel-od-steps li.is-done { color: var(--mel-jade); }
.mel-od-steps li.is-done i { background: var(--mel-jade) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 15px no-repeat; border-color: var(--mel-jade); }
.mel-od-steps li.is-now { color: var(--mel-ink); font-weight: 800; }
.mel-od-steps li.is-now i { border-color: var(--mel-gold); background: #fff8e6; color: var(--mel-amber); box-shadow: 0 0 0 5px rgba(212, 164, 65, .18); }

/* Back link */
.mel-od-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 99px; background: #fff; border: 1px solid var(--mel-line); color: var(--mel-ink) !important; font-size: 13px; font-weight: 700; text-decoration: none !important; }
.mel-od-back::before { content: "→"; color: var(--mel-jade); }

/* Items */
.mel-od-items { display: flex; flex-direction: column; }
.mel-od-items li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--mel-line); }
.mel-od-items li:first-child { padding-top: 0; }
.mel-od-items__img { width: 56px; height: 56px; border-radius: 14px; overflow: hidden; background: var(--mel-mist); }
.mel-od-items__img img { width: 100% !important; height: 100% !important; object-fit: cover; }
.mel-od-items__txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.6; }
.mel-od-items__txt small { color: var(--mel-gold); font-size: 11px; font-weight: 700; }
.mel-od-items__txt b { font-size: 14px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; }
.mel-od-items__txt em { color: var(--mel-muted); font-size: 12px; font-style: normal; }
.mel-od-items__end { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: end; }
.mel-od-items__end b { font-size: 13.5px; font-weight: 800; white-space: nowrap; }
.mel-od-items__end small { color: var(--mel-muted); font-size: 11px; font-weight: 500; }
.mel-od-tag { padding: 2px 8px; border-radius: 8px; background: #fff4dc; color: var(--mel-amber); font-size: 11px; font-weight: 700; white-space: nowrap; }
.mel-od-sum { display: flex; flex-direction: column; gap: 6px; margin-top: 14px !important; }
.mel-od-sum > div { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.mel-od-sum dt { color: var(--mel-muted); }
.mel-od-sum dd { font-weight: 700; }
.mel-od-sum .is-total { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--mel-line); font-size: 15px; }
.mel-od-sum .is-total dt { color: var(--mel-ink); font-weight: 800; }
.mel-od-sum .is-total dd { font-size: 18px; font-weight: 900; color: var(--mel-jade); }
.mel-od-sum .is-total small { font-size: 12px; color: var(--mel-muted); font-weight: 600; }

/* Address, notes, help */
.mel-od-addr { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.mel-od-addr small { color: var(--mel-muted); font-size: 12.5px; }
.mel-od-notes li { padding: 10px 12px; border-radius: 14px; background: var(--mel-paper); font-size: 13.5px; }
.mel-od-notes li + li { margin-top: 8px; }
.mel-od-notes time { display: block; color: var(--mel-muted); font-size: 11.5px; }
.mel-od-notes p { margin: 0 !important; }
.mel-od-help { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px dashed rgba(31, 90, 64, .35); border-radius: 18px; background: rgba(238, 242, 234, .6); color: var(--mel-ink) !important; text-decoration: none !important; }
.mel-od-help i { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--mel-jade) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12z'/%3E%3Cpath d='M9.5 9.5a2.5 2.5 0 1 1 3.5 2.3c-.6.3-1 .8-1 1.5M12 16.5h.01'/%3E%3C/svg%3E") center / 22px no-repeat; }
.mel-od-help span { display: flex; flex-direction: column; line-height: 1.6; }
.mel-od-help b { font-size: 13.5px; }
.mel-od-help small { color: var(--mel-muted); font-size: 12px; }

/* Output of payment plugins (shetab-direct-payment: card number, receipt…): left as it is, only fitted into the card */
.mel-od-extra { overflow-x: auto; font-size: 14px; scroll-margin-top: 90px; }
.mel-od-extra > :first-child { margin-top: 0 !important; }
.mel-od-extra > :last-child { margin-bottom: 0 !important; }
.mel-od-extra table { width: 100%; }
.mel-od-extra img { max-width: 100%; height: auto; }

/* Orders list */
.mel-od-alert { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; background: #fff8e6; border: 1px solid rgba(212, 164, 65, .4); }
.mel-od-alert i { flex: none; width: 38px; height: 38px; border-radius: 12px; background: var(--mel-gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230c2419' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 8v5M12 16.5h.01'/%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3C/svg%3E") center / 22px no-repeat; }
.mel-od-alert span { display: flex; flex-direction: column; line-height: 1.6; }
.mel-od-alert b { font-size: 13.5px; }
.mel-od-alert small { color: var(--mel-muted); font-size: 12px; }
.mel-od-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.mel-od-filter button { display: inline-flex !important; align-items: center; gap: 6px; height: 36px !important; padding: 0 14px !important; border: 1px solid var(--mel-line) !important; border-radius: 99px !important; background: #fff !important; color: var(--mel-ink) !important; font-size: 12.5px !important; font-weight: 700 !important; cursor: pointer; box-shadow: none !important; text-transform: none !important; }
.mel-od-filter button span { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--mel-mist); font-size: 11px; line-height: 20px; text-align: center; }
.mel-od-filter button[aria-selected="true"] { background: var(--mel-jade) !important; border-color: var(--mel-jade) !important; color: #fff !important; }
.mel-od-filter button[aria-selected="true"] span { background: rgba(255, 255, 255, .2); }
.mel-od-list { display: grid; gap: 12px; }
@media (min-width: 900px) { .mel-od-list { grid-template-columns: 1fr 1fr; } }
.mel-oc { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "th main pill" "foot foot foot"; align-items: center; gap: 12px 12px; padding: 16px; border: 1px solid var(--mel-line); border-radius: 20px; background: #fff; transition: border-color .2s, box-shadow .2s, transform .2s; }
.mel-oc[hidden] { display: none; }
.mel-oc:hover { border-color: rgba(31, 90, 64, .3); box-shadow: 0 16px 30px -24px rgba(12, 36, 25, .6); transform: translateY(-1px); }
.mel-oc.is-act { border-color: rgba(212, 164, 65, .55); }
.mel-oc__link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.mel-oc__thumbs { grid-area: th; display: flex; }
.mel-oc__thumbs span { width: 48px; height: 48px; border-radius: 14px; overflow: hidden; background: var(--mel-mist); border: 2px solid #fff; }
.mel-oc__thumbs span + span { margin-inline-start: -22px; }
.mel-oc__thumbs img { width: 100% !important; height: 100% !important; object-fit: cover; }
.mel-oc__main { grid-area: main; display: flex; flex-direction: column; min-width: 0; line-height: 1.6; }
.mel-oc__main b { font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mel-oc__main small { color: var(--mel-muted); font-size: 12px; }
.mel-oc .mel-od-pill { grid-area: pill; }
.mel-oc__foot { grid-area: foot; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px dashed var(--mel-line); }
.mel-oc__foot > b { font-size: 16px; font-weight: 900; }
.mel-oc__foot > b small { color: var(--mel-muted); font-size: 11.5px; font-weight: 600; }
.mel-oc__foot .mel-pbtn { position: relative; z-index: 2; }
.mel-oc__more { display: inline-flex; align-items: center; gap: 4px; color: var(--mel-jade); font-size: 12.5px; font-weight: 800; }
.mel-oc__more::after { content: "←"; }
@media (max-width: 420px) { .mel-oc { grid-template-areas: "th main" "pill pill" "foot foot"; grid-template-columns: auto minmax(0, 1fr); } .mel-oc .mel-od-pill { justify-self: start; } }

/* Empty */
.mel-od .mel-empty { padding: 34px 20px; border: 1px dashed var(--mel-line); border-radius: 22px; background: #fff; text-align: center; }
.mel-od .mel-empty strong { display: block; font-size: 16px; margin-bottom: 4px; }
.mel-od .mel-empty p { color: var(--mel-muted); font-size: 13.5px; }
.mel-od .mel-empty p + p { margin-top: 14px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* Thank-you page */
.mel-ty { max-width: 1080px; margin: 0 auto 40px; }
.mel-ty__hero { text-align: center; padding: 28px 20px 22px; }
.mel-ty__hero h1 { margin: 12px 0 0 !important; font-size: clamp(19px, 5vw, 26px) !important; font-weight: 900 !important; line-height: 1.5 !important; color: var(--mel-ink) !important; }
.mel-ty__hero > p { max-width: 560px; margin: 8px auto 0; }
.mel-ty__hero .mel-od-facts { text-align: start; }
.mel-ty__icon { display: block; width: 76px; height: 76px; margin: 0 auto; border-radius: 50%; background: var(--mel-jade) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 36px no-repeat; box-shadow: 0 0 0 10px rgba(31, 90, 64, .1), 0 16px 30px -14px rgba(31, 90, 64, .8); animation: mel-ty-pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.mel-ty__icon.is-pay { background-color: var(--mel-gold); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230c2419' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5.5' width='18' height='13' rx='2.5'/%3E%3Cpath d='M3 10h18M7 15h3'/%3E%3C/svg%3E"); box-shadow: 0 0 0 10px rgba(212, 164, 65, .16), 0 16px 30px -14px rgba(212, 164, 65, .9); }
.mel-ty__icon.is-review { background-color: #3a5b8c; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 7.5V12l3 2'/%3E%3C/svg%3E"); box-shadow: 0 0 0 10px rgba(58, 91, 140, .12); }
.mel-ty__icon.is-failed, .mel-ty__icon.is-cancelled, .mel-ty__icon.is-refunded { background-color: var(--mel-danger); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E"); box-shadow: 0 0 0 10px rgba(180, 67, 42, .1); }
@keyframes mel-ty-pop { from { transform: scale(.4); opacity: 0; } }
.mel-ty__acts { margin-top: 16px !important; }
.mel-ty__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mel-ty__nav .mel-pbtn { width: 100%; padding: 0 10px !important; }

/* Woodmart's own thank-you leftovers next to ours */
.woocommerce-order-received .woocommerce-order > .woocommerce-notice, .woocommerce-order-received .woocommerce-order-overview { display: none !important; }
.mel-ty-pay { margin: 16px 0; }
