/* Mirac Loyalty Plugin Styles */
:root {
    --ml-primary: #E8593C;
    --ml-primary-dark: #993C1D;
    --ml-light: #FDF0ED;
    --ml-muted: #777;
    --ml-border: #e0e0e0;
    --ml-radius: 10px;
    --ml-success: #1D9E75;
}

/* ---- Checkout Boxes ---- */
.ml-redeem-box,
.ml-first-pizza-box {
    background: var(--ml-light);
    border: 1.5px solid #F5C4B3;
    border-radius: var(--ml-radius);
    padding: 18px 20px;
    margin-bottom: 20px;
}

.ml-first-pizza-box {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ml-wallet-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.ml-wallet-icon { font-size: 22px; }

.ml-balance {
    display: block;
    font-size: 13px;
    color: var(--ml-muted);
    margin-top: 2px;
}

.ml-applied-badge {
    margin-left: auto;
    background: #edfaf1;
    border: 1px solid #68d391;
    color: #276749;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.ml-redeem-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.ml-redeem-row input[type="number"] {
    flex: 1;
    min-width: 120px;
    padding: 10px 12px;
    border: 1.5px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
}

.ml-btn {
    padding: 10px 20px;
    background: var(--ml-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.ml-btn:hover { background: var(--ml-primary-dark); }
.ml-btn:disabled { background: #aaa; cursor: not-allowed; }

.ml-btn-outline {
    background: transparent;
    color: var(--ml-primary);
    border: 1.5px solid var(--ml-primary);
}

.ml-btn-outline:hover {
    background: var(--ml-light);
}

.ml-hint, .ml-no-balance {
    font-size: 12px;
    color: var(--ml-muted);
    margin-top: 6px;
    margin-bottom: 0;
}

.ml-msg {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
}

.ml-msg.success { background: #edfaf1; color: #276749; border: 1px solid #68d391; }
.ml-msg.error   { background: #fff5f5; color: #c53030; border: 1px solid #fc8181; }

/* ---- My Account Page ---- */
.ml-account-page { font-family: inherit; }

.ml-wallet-card {
    background: linear-gradient(135deg, #993C1D 0%, #E8593C 100%);
    border-radius: 14px;
    padding: 24px 28px;
    color: #fff;
    margin-bottom: 20px;
}

.ml-wallet-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.ml-wallet-card-label { font-size: 13px; opacity: 0.85; margin-bottom: 6px; }
.ml-wallet-card-balance { font-size: 36px; font-weight: 700; }

.ml-wallet-card-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    opacity: 0.9;
    flex-wrap: wrap;
}

.ml-tier-badge {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    background: rgba(255,255,255,0.25);
    color: #fff;
}

.ml-progress-box {
    background: #fff;
    border: 1px solid var(--ml-border);
    border-radius: var(--ml-radius);
    padding: 16px 20px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.ml-progress-label { font-size: 13px; color: var(--ml-muted); flex: 1; min-width: 150px; }

.ml-progress-bar-wrap {
    flex: 2;
    min-width: 120px;
    background: #f0f0f0;
    border-radius: 6px;
    height: 10px;
    overflow: hidden;
}

.ml-progress-bar {
    height: 100%;
    background: var(--ml-primary);
    border-radius: 6px;
    transition: width 0.5s;
}

.ml-progress-pct { font-size: 13px; font-weight: 600; color: var(--ml-primary); min-width: 36px; text-align: right; }

.ml-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.ml-stat-card {
    background: #f9f9f9;
    border: 1px solid var(--ml-border);
    border-radius: var(--ml-radius);
    padding: 14px 16px;
}

.ml-stat-label { font-size: 12px; color: var(--ml-muted); margin-bottom: 4px; }
.ml-stat-val   { font-size: 20px; font-weight: 700; color: var(--ml-primary); }
.ml-stat-sub   { font-size: 11px; color: #aaa; margin-top: 4px; }

.ml-section {
    background: #fff;
    border: 1px solid var(--ml-border);
    border-radius: var(--ml-radius);
    padding: 20px 22px;
    margin-bottom: 16px;
}

.ml-section h3 { margin: 0 0 16px; font-size: 16px; }

.ml-txn-list, .ml-notif-list { display: flex; flex-direction: column; gap: 0; }

.ml-txn-item, .ml-notif-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
    gap: 12px;
}

.ml-txn-item:last-child, .ml-notif-item:last-child { border-bottom: none; }
.ml-txn-expired { opacity: 0.5; }
.ml-txn-desc  { font-size: 14px; font-weight: 500; }
.ml-txn-date  { font-size: 12px; color: var(--ml-muted); margin-top: 2px; }
.ml-txn-amount{ font-size: 16px; font-weight: 700; white-space: nowrap; }
.ml-credit    { color: var(--ml-success); }
.ml-debit     { color: #d63638; }

.ml-notif-msg  { font-size: 13px; line-height: 1.5; flex: 1; }
.ml-notif-time { font-size: 11px; color: #aaa; white-space: nowrap; }

.ml-how-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.ml-how-item {
    background: var(--ml-light);
    border-radius: 8px;
    padding: 14px 16px;
}

.ml-how-item strong { display: block; margin-bottom: 6px; font-size: 14px; }
.ml-how-item p { font-size: 13px; color: var(--ml-muted); margin: 0; }

/* Responsive */
@media (max-width: 600px) {
    .ml-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .ml-how-grid   { grid-template-columns: 1fr; }
    .ml-wallet-card-balance { font-size: 28px; }
    .ml-wallet-card-meta { gap: 10px; }
    .ml-redeem-row { flex-direction: column; }
    .ml-btn { width: 100%; }
    .ml-progress-box { flex-direction: column; align-items: flex-start; }
}
