/* Mini widget (menu icon + amount) */
.cc-mini-widget {
    display: block;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    color: inherit;
}
.cc-mini-icon { font-size: 15px; }

.cc-mini-label { font-size: 12px; color: #333; }


/* Account page */
.cc-account-wrap { max-width: 720px; margin: 0 auto; }
.cc-account-title { text-align: center; font-size: 20px; margin-bottom: 16px; }
.cc-account-banner {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-align: center;
    padding: 14px;
    margin-bottom: 14px;
}
.cc-account-banner-label { font-size: 12px; color: #6b7280; margin-bottom: 6px; }
.cc-account-banner-amount { font-size: 24px; font-weight: 600; }

.cc-account-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}
.cc-account-stat {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px;
    text-align: center;
}
.cc-account-stat-icon { font-size: 18px; }
.cc-account-stat-value { font-size: 17px; font-weight: 600; }
.cc-account-stat-label { font-size: 11.5px; color: #6b7280; }

.cc-account-transactions {
    background: #fff;
    overflow: hidden;
}
.cc-account-transactions-header {
    display: flex;
    justify-content: space-between;
    padding: 14px 18px;
    background: #f7f8fa;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 14px;
}
.cc-account-transactions-count { color: #6b7280; font-weight: 400; }

/* Rewards History — card list (desktop and mobile alike, mirrors the
   Order card design used on the order-view page). */
.cc-tx-list { display: flex; flex-direction: column; gap: 12px; }
.cc-tx-empty { padding: 20px 0; text-align: center; color: #6b7280; font-size: 13px; }

.cc-tx-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.cc-tx-card:hover {
    border-color: #a7f3d0;
    box-shadow: 0 2px 12px rgba(31,178,113,0.08);
}

.cc-tx-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}
.cc-tx-card-headtext { min-width: 0; }
.cc-tx-card-desc {
    font-size: 13.5px;
    font-weight: 600;
    color: #111827;
    line-height: 1.35;
}
.cc-tx-card-date {
    font-size: 11.5px;
    color: #6b7280;
    margin-top: 3px;
}
.cc-tx-card-ref {
    display: block;
    font-size: 11px;
    color: #9ca3af;
    margin-top: 3px;
    text-align: right;
}

.cc-tx-card-body {
    display: flex;
    align-items: center;
    gap: 12px;
}
.cc-tx-card-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 11px;
    background: #f7f8fa;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}
.cc-tx-card-info { flex: 1; min-width: 0; }
.cc-tx-card-amount { font-size: 15px; font-weight: 600; }
.cc-tx-card-expiry { font-size: 11.5px; color: #9ca3af; margin-top: 3px; }

.cc-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px 18px; }
.cc-pagination-btn { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 6px 14px; font-size: 12.5px; cursor: pointer; }
.cc-pagination-btn:disabled { opacity: 0.4; cursor: not-allowed; }

@media (max-width: 640px) {
.cc-modal-header { padding: 22px 18px 18px !important; }
.cc-modal-title { font-size: 16px !important; }
.cc-modal-body { padding: 14px 10px 20px !important; }
.cc-account-banner-amount { font-size: 18px !important; }
}

.cc-pagination-status { font-size: 12.5px; color: #6b7280; }
.cc-amount-negative { color: #dc2626; font-weight: 500; }
.cc-amount-positive { color: #059669; font-weight: 500; }
.cc-type-pill {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 11px;
    background: #fef2f2;
    color: #b91c1c;
}
.cc-type-cashback { background: #ecfdf5; color: #065f46; }
.cc-type-refund { background: #eff6ff; color: #1d4ed8; }
.cc-type-manual_admin { background: #f5f3ff; color: #6d28d9; }
.cc-type-full_payment { background: #ecfdf5; color: #065f46; }
.cc-type-partial_payment { background: #fef2f2; color: #b91c1c; }
.cc-type-cashback_clawback { background: #fff7ed; color: #c2410c; }
.cc-type-expired { background: #f3f4f6; color: #4b5563; }
.cc-type-credit { background: #ecfdf5; color: #065f46; }
.cc-type-debit { background: #fef2f2; color: #b91c1c; }
.cc-td-expiry-none { color: #9ca3af; }

/* Wallet chip/input box (used by slide cart drawer + pay now view) */
.cc-wallet-box { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.16); padding: 10px; border-radius: 10px; }
.cc-wallet-box-header { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 600; }
.cc-wallet-available { font-weight: 400; color: #6b7280; }
.cc-wallet-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.cc-wallet-chip {
    background: #f7f8fa;
    border: 1.5px solid #e5e7eb;
    border-radius: 20px;
    padding: 7px 16px;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
}
.cc-wallet-chip:hover { border-color: #1fb271; background: #e6f9f1; }
.cc-wallet-chip-full { border-color: #1fb271; color: #1fb271; font-weight: 600; }
.cc-wallet-custom-row { display: flex; gap: 10px; }
.cc-wallet-custom-row input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
}
.cc-wallet-custom-row button {
    background: #111827;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0 18px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}
.cc-wallet-message { font-size: 12px; color: #dc2626; }
.cc-wallet-applied {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #e6f9f1;
    border: 1px solid #a7f3d0;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    color: #1fb271;
}

/* =====================================================
   Credit widget modal — mirrors the WC Order Manager
   "view order detail" modal (overlay, card, close button,
   header layout, animations) so the two look identical.
===================================================== */
:root {
    --cc-modal-border: #E5E7EB;
    --cc-modal-radius: 20px;
    --cc-modal-shadow: 0 24px 64px rgba(0,0,0,0.14), 0 4px 16px rgba(0,0,0,0.06);
    --cc-modal-font:   -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.cc-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-family: var(--cc-modal-font);
}
.cc-modal-overlay.is-open { display: flex; animation: ccModalFadeIn 0.2s ease; }
@keyframes ccModalFadeIn { from { opacity: 0; } to { opacity: 1; } }
.cc-modal-card {
    background: #fff;
    border-radius: var(--cc-modal-radius);
    box-shadow: var(--cc-modal-shadow);
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    position: relative;
    animation: ccModalSlideUp 0.28s cubic-bezier(0.34,1.4,0.64,1);
    scrollbar-width: thin;
    scrollbar-color: var(--cc-modal-border) transparent;
    border: 1px solid var(--cc-modal-border);
}
.cc-modal-card::-webkit-scrollbar { width: 4px; }
.cc-modal-card::-webkit-scrollbar-thumb { background: var(--cc-modal-border); border-radius: 4px; }
@keyframes ccModalSlideUp {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.cc-modal-close {
    position: absolute;
    top: 16px; right: 16px;
    z-index: 10;
    background: #fff;
    border: 1px solid var(--cc-modal-border);
    border-radius: 50%;
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: #6B7280;
    transition: all 0.18s;
    padding: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    opacity: 0.5;
}
.cc-modal-close:hover { background: #F7F8FA; color: #111827; transform: rotate(90deg) scale(1.05); }
.cc-modal-loading {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 64px 32px; gap: 16px;
    color: #6B7280; font-size: 14px;
}
.cc-modal-spinner {
    width: 28px; height: 28px;
    border: 2.5px solid var(--cc-modal-border);
    border-top-color: #1fb271;
    border-radius: 50%;
    animation: ccModalSpin 0.75s linear infinite;
}
@keyframes ccModalSpin { to { transform: rotate(360deg); } }
.cc-modal-header {
    display: flex; align-items: center;
    justify-content: space-between; flex-wrap: wrap;
    gap: 12px;
    padding: 20px 28px 20px;
    background: linear-gradient(135deg, #F0FDF9 0%, #FFFFFF 100%);
    border-bottom: 1px solid #A7F3D0;
}
.cc-modal-meta { display: flex; flex-direction: column; gap: 3px; }
.cc-modal-title { font-size: 18px; font-weight: 500; color: #111827; letter-spacing: -0.02em; }
.cc-modal-subtitle { font-size: 12px; color: #6B7280; }
.cc-modal-status-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: 100px;
    font-size: 12px; font-weight: 600;
    letter-spacing: 0.02em;
    background: #F0FDF9;
    color: #065F46;
    border: 1px solid #A7F3D0;
}
.cc-modal-status-dot {
    width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
    background: #1fb271;
    animation: ccModalPulse 2.2s ease-in-out infinite;
}
@keyframes ccModalPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.6; transform: scale(1.4); }
}
.cc-modal-body { padding: 14px 20px 20px; }
/* The full account shortcode is reused inside the modal body — drop
   its own max-width/centering and duplicate title, since the modal
   header above already carries the title. */
.cc-modal-body .cc-account-wrap { max-width: none; margin: 0; }
.cc-modal-body .cc-account-title { display: none; }
.cc-wallet-remove { background: none; border: none; color: #6b7280; font-size: 12px; cursor: pointer; }

/*chillgoza rewards expiry notice*/
.cc-expiry-notice{display:flex;align-items:center;gap:12px;margin:0 0 14px 0;padding:12px 14px;border:1px solid #dcefe7;border-radius:12px;background:linear-gradient(135deg,#f5fffb,#fff);box-shadow:0 4px 14px rgba(22,168,120,.06)}
.cc-expiry-icon{width:38px;height:38px;flex:0 0 38px;display:flex;align-items:center;justify-content:center;border-radius:11px;background:#e8f9f1;font-size:17px}
.cc-expiry-content{flex:1;min-width:0}
.cc-expiry-title{margin-bottom:3px;color:#177b5b;font-size:12px;font-weight:700;line-height:1.3}
.cc-expiry-text{color:#65756f;font-size:11px;line-height:1.5}
.cc-expiry-text .woocommerce-Price-amount{color:#177b5b;font-weight:700}
.cc-expiry-medium{border-color:#f6dfae;background:linear-gradient(135deg,#fffaf0,#fff)}
.cc-expiry-medium .cc-expiry-icon{background:#fff1d1}
.cc-expiry-medium .cc-expiry-title{color:#a36a0c}
.cc-expiry-medium .cc-expiry-text .woocommerce-Price-amount{color:#a36a0c}
.cc-expiry-urgent{border-color:#ffd0c9;background:linear-gradient(135deg,#fff6f4,#fff)}
.cc-expiry-urgent .cc-expiry-icon{background:#ffe5e0}
.cc-expiry-urgent .cc-expiry-title{color:#d04d3e}
.cc-expiry-urgent .cc-expiry-text .woocommerce-Price-amount{color:#d04d3e}
@media(max-width:480px){.cc-expiry-notice{gap:9px;padding:10px 11px}.cc-expiry-icon{width:34px;height:34px;flex-basis:34px;font-size:15px}.cc-expiry-title{font-size:11px}.cc-expiry-text{font-size:10px}}