/* ============================================================
   MC Order Details & Thank You Page
   ============================================================ */

/* ── Order details (view-order in panel) ──────────────────── */
.mc-order-details {
    width: 100%;
}

.mc-order-details__title {
    font-size: 18px;
    font-weight: 700;
    color: #252525;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.mc-order-items-card {
    border: 1.5px solid #eee;
    border-radius: 12px;
    overflow: hidden;
}

/* ── Items list ───────────────────────────────────────────── */
.mc-order-items-head {
    display: flex;
    justify-content: space-between;
    padding: 10px 18px;
    background: #f7f7f7;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #999;
    border-bottom: 1px solid #eee;
}

.mc-order-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border-bottom: 1px solid #f5f5f5;
}

.mc-order-item:last-child {
    border-bottom: none;
}

.mc-order-item__name {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #252525;
    flex: 1;
    min-width: 0;
}

.mc-order-item__name a {
    color: #252525;
    text-decoration: none;
    transition: color 0.2s;
}

.mc-order-item__name a:hover {
    color: #4C6C56;
}

.mc-order-item__qty {
    font-size: 13px;
    font-weight: 400;
    color: #999;
    white-space: nowrap;
}

.mc-order-item__total {
    font-size: 14px;
    font-weight: 600;
    color: #252525;
    white-space: nowrap;
    text-align: right;
}

.mc-order-item__note {
    padding: 0 18px 12px;
    font-size: 13px;
    color: #888;
}

/* ── Totals ───────────────────────────────────────────────── */
.mc-order-totals {
    background: #fafafa;
    border-top: 2px solid #eee;
    padding: 4px 0;
}

.mc-order-totals__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 9px 18px;
}

.mc-order-totals__row--total {
    border-top: 2px solid #eee;
    margin-top: 4px;
    padding-top: 14px;
    padding-bottom: 14px;
}

.mc-order-totals__row--total .mc-order-totals__label,
.mc-order-totals__row--total .mc-order-totals__value {
    font-size: 16px;
    font-weight: 700;
    color: #252525;
}

.mc-order-totals__label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.mc-order-totals__value {
    font-size: 14px;
    font-weight: 600;
    color: #252525;
    text-align: right;
}

.mc-order-totals__note {
    display: flex;
    gap: 12px;
    padding: 9px 18px;
    font-size: 13px;
    border-top: 1px solid #eee;
    color: #666;
}

/* ── Actions ──────────────────────────────────────────────── */
.mc-order-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 18px;
    border-top: 1px solid #eee;
    background: #fafafa;
}

.mc-order-action-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    background-color: #252525;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.mc-order-action-btn:hover {
    background-color: #4C6C56;
    color: #fff;
    text-decoration: none;
}

/* ── Addresses ────────────────────────────────────────────── */
.mc-order-addresses {
    margin-top: 28px;
}

.mc-order-addresses__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.mc-order-addresses__grid--two {
    grid-template-columns: 1fr 1fr;
}

.mc-order-address-card {
    background: #fafafa;
    border: 1.5px solid #eee;
    border-radius: 12px;
    padding: 20px;
    box-sizing: border-box;
}

.mc-order-address-card__label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #999;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.mc-order-address-card__body {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mc-order-address-card address {
    font-style: normal;
    font-size: 14px;
    color: #333;
    line-height: 1.8;
    margin: 0 0 8px;
}

.mc-order-address__meta {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 4px 0 0;
    padding: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.mc-order-address__meta svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    stroke: #4C6C56;
    margin-top: 1px;
}

/* ============================================================
   DOWNLOADS
   ============================================================ */

.mc-order-downloads {
    margin-bottom: 28px;
}

.mc-order-downloads__title {
    font-size: 16px;
    font-weight: 700;
    color: #252525;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.mc-order-downloads__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mc-order-download-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    background: #fafafa;
    border: 1.5px solid #eee;
    border-radius: 10px;
    transition: border-color 0.2s;
}

.mc-order-download-item:hover {
    border-color: #4C6C56;
}

.mc-order-download-item__info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.mc-order-download-item__name {
    font-size: 14px;
    font-weight: 700;
    color: #252525;
}

.mc-order-download-item__name a {
    color: #252525;
    text-decoration: none;
}

.mc-order-download-item__name a:hover {
    color: #4C6C56;
}

.mc-order-download-item__file {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
}

.mc-order-download-item__file svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    stroke: #aaa;
}

.mc-order-download-item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 2px;
}

.mc-order-download-item__badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: #e8f0fe;
    color: #1a56c4;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
}

.mc-order-download-item__expires {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #999;
}

.mc-order-download-item__expires svg {
    width: 12px;
    height: 12px;
    stroke: #bbb;
}

.mc-order-download-item__btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    background-color: #4C6C56;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background-color 0.2s;
}

.mc-order-download-item__btn:hover {
    background-color: #3a5543;
    color: #fff;
    text-decoration: none;
}

.mc-order-download-item__btn svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
}

@media (max-width: 480px) {
    .mc-order-download-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .mc-order-download-item__btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================
   THANK YOU PAGE
   ============================================================ */

.mc-thankyou {
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* ── Hero ─────────────────────────────────────────────────── */
.mc-thankyou-hero {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 32px;
    background: linear-gradient(135deg, #f7faf8 0%, #eef4f0 100%);
    border: 1.5px solid #d4e6da;
    border-radius: 16px;
    margin-bottom: 24px;
}

.mc-thankyou-hero__icon {
    width: 64px;
    height: 64px;
    background: #4C6C56;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mc-thankyou-hero__icon svg {
    width: 32px;
    height: 32px;
    stroke: #fff;
}

.mc-thankyou-hero__title {
    font-size: 26px;
    font-weight: 800;
    color: #252525;
    margin: 0 0 6px;
    line-height: 1.2;
}

.mc-thankyou-hero__sub {
    font-size: 15px;
    color: #555;
    margin: 0;
    line-height: 1.5;
}

/* ── Meta bar ─────────────────────────────────────────────── */
.mc-thankyou-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0;
    border: 1.5px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 28px;
}

.mc-thankyou-meta__item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 16px 20px;
    border-right: 1px solid #eee;
    box-sizing: border-box;
}

.mc-thankyou-meta__item:last-child {
    border-right: none;
}

.mc-thankyou-meta__icon {
    width: 28px;
    height: 28px;
    background: #f0f5f2;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.mc-thankyou-meta__icon svg {
    width: 14px;
    height: 14px;
    stroke: #4C6C56;
}

.mc-thankyou-meta__label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #aaa;
}

.mc-thankyou-meta__value {
    font-size: 14px;
    font-weight: 600;
    color: #252525;
    word-break: break-all;
}

.mc-thankyou-meta__value--status {
    color: #4C6C56;
}

.mc-thankyou-meta__value--total {
    font-size: 16px;
    font-weight: 800;
}

/* ── Body (order details inside thankyou) ─────────────────── */
.mc-thankyou-body {
    margin-bottom: 24px;
}

/* ── Footer buttons ───────────────────────────────────────── */
.mc-thankyou-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 8px;
}

.mc-thankyou-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 28px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    white-space: nowrap;
    cursor: pointer;
    border: none;
}

.mc-thankyou-btn--primary {
    background-color: #4C6C56;
    color: #fff;
}

.mc-thankyou-btn--primary:hover {
    background-color: #3a5543;
    color: #fff;
    text-decoration: none;
}

.mc-thankyou-btn--secondary {
    background-color: #f3f3f3;
    color: #252525;
}

.mc-thankyou-btn--secondary:hover {
    background-color: #e8e8e8;
    color: #252525;
    text-decoration: none;
}

/* ── Failed state ─────────────────────────────────────────── */
.mc-thankyou-failed {
    text-align: center;
    padding: 48px 32px;
    border: 1.5px solid #fee2e2;
    border-radius: 16px;
    background: #fff5f5;
}

.mc-thankyou-failed__icon {
    width: 72px;
    height: 72px;
    background: #fee2e2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.mc-thankyou-failed__icon svg {
    width: 36px;
    height: 36px;
    stroke: #e94560;
}

.mc-thankyou-failed__title {
    font-size: 22px;
    font-weight: 700;
    color: #252525;
    margin: 0 0 8px;
}

.mc-thankyou-failed__desc {
    font-size: 14px;
    color: #666;
    margin: 0 0 24px;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
}

.mc-thankyou-failed__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 640px) {

    /* ── Order details full width ─────────────────────────── */
    .mc-order-details,
    .mc-order-layout,
    .mc-order-items-card,
    .mc-order-items,
    .mc-order-totals,
    .mc-order-actions,
    .mc-order-addresses,
    .mc-order-downloads,
    .mc-order-downloads__list {
        width: 100% !important;
        box-sizing: border-box;
        min-width: 0;
    }

    .mc-order-items-head,
    .mc-order-item,
    .mc-order-totals__row,
    .mc-order-download-item {
        padding-left: 14px;
        padding-right: 14px;
    }

    .mc-order-item {
        flex-wrap: wrap;
        gap: 8px;
    }

    .mc-order-item__total {
        margin-left: auto;
    }

    .mc-order-totals__row--total {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    /* ── Addresses ────────────────────────────────────────── */
    .mc-order-addresses__grid,
    .mc-order-addresses__grid--two {
        grid-template-columns: 1fr;
    }

    /* ── Overview bar (thankyou / view-order) ─────────────── */
    .mc-lr-panel-content ul.woocommerce-order-overview {
        border-radius: 8px;
    }

    .mc-lr-panel-content ul.woocommerce-order-overview li {
        flex: 1 1 50%;
        border-right: 1px solid #eee;
    }

    .mc-lr-panel-content ul.woocommerce-order-overview li:nth-child(even) {
        border-right: none;
    }

    .mc-thankyou-hero {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
    }

    .mc-thankyou-meta {
        grid-template-columns: 1fr 1fr;
    }

    .mc-thankyou-meta__item {
        border-bottom: 1px solid #eee;
    }

    .mc-thankyou-meta__item:nth-last-child(-n+2) {
        border-bottom: none;
    }

    .mc-thankyou-meta__item:nth-child(even) {
        border-right: none;
    }

    .mc-thankyou-footer {
        justify-content: stretch;
    }

    .mc-thankyou-btn {
        flex: 1 1 auto;
        text-align: center;
    }

    .mc-order-item {
        flex-wrap: wrap;
    }

    .mc-thankyou-hero__title {
        font-size: 20px;
    }
}

@media (max-width: 400px) {
    .mc-thankyou-meta {
        grid-template-columns: 1fr;
    }

    .mc-thankyou-meta__item {
        border-right: none;
        border-bottom: 1px solid #eee;
    }

    .mc-thankyou-meta__item:last-child {
        border-bottom: none;
    }
}
