.sr-card{border:1px solid #e5e7eb;border-radius:12px; background:#fff;margin:15px 0}
.sr-card__header{
    padding:16px 20px;
    border-bottom:1px solid #f0f2f5;
    background:#fff;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    flex-wrap:wrap;
}
.sr-card__header--stack{
    flex-direction:column;
    align-items:flex-start;
}
.sr-card__header h3{
    margin:0;
    font-size:18px;
    display:flex;
    align-items:center;
    gap:8px;
}
.sr-card__title-icon{
    width:22px;
    height:22px;
    object-fit:contain;
    display:inline-block;
}
.sr-program-headline{
    display:flex;
    align-items:center;
    gap:12px;
    width:100%;
    font-size:22px;
    font-weight:700;
    color:#111827;
}
.sr-program-headline__name{
    line-height:1;
}
.sr-program-metrics{
    width:100%;
    display:flex;
    gap:12px;
    flex-wrap:wrap;
}
.sr-program-metric{
    flex:1 1 calc(50% - 6px);
    min-width:220px;
    padding:10px 14px;
    border:1px solid #e5e7eb;
    border-radius:12px;
    background:#f5f5f4;
    text-align:center;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
}
.sr-program-metric__label{
    font-size:11px;
    color:#6b7280;
    text-transform:uppercase;
    letter-spacing:.08em;
    margin-bottom:5px;
}
.sr-program-metric__value{
    font-size:34px;
    font-weight:700;
    color:#111827;
    line-height:1;
}
.sr-actions-row{
    width:100%;
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}
.sr-secondary-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    padding:0px 14px;
    border-radius:5px;
    border:1px solid #e5e7eb;
    background:#d1d5db;
    font-weight:600;
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:.05em;
    color:#111827;
    cursor:pointer;
    transition:all .2s ease;
    flex:1 1 calc(50% - 5px);
    min-height:25px;
}
.sr-secondary-btn:hover{
    background:#d1d5db;
    border-color:#cbd5e1;
}
.sr-secondary-btn--accent{
    border-color:#111827;
    background:#111827;
    color:#fff;
}
.sr-secondary-btn--accent:hover{
    background:#020617;
    border-color:#020617;
    color:#fff;
}
.sr-applied-banner{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    padding:12px 20px;
    background:#ecfdf5;
    border-top:1px solid #bbf7d0;
    border-bottom:1px solid #bbf7d0;
    color:#166534;
    font-weight:600;
}
.sr-applied-banner__value{
    font-size:16px;
}
.sr-breakdown-link{
    display:flex;
    justify-content:flex-end;
    margin-top:18px;
}
.sr-breakdown-link summary{
    cursor:pointer;
    color:var(--sr-primary,#2563eb);
    font-weight:600;
}
.sr-kpis{display:flex;gap:24px}
.sr-kpi{display:flex;flex-direction:column}
.sr-kpi__label{font-size:12px;color:#6b7280;text-transform:uppercase;letter-spacing:.06em}
.sr-kpi__value{font-size:22px;color:#111827;font-weight:700}
.sr-card__body{padding:16px 20px}
.sr-redeem{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:8px}
.sr-redeem__left{flex:1}
.sr-slider-row{
    display:flex;
    align-items:center;
    gap:14px;
    margin-top:6px;
}
.sr-slider-row input[type=range]{
    flex:1;
}
.sr-slider-row input[type=number]{
    width:110px;
    padding:6px 10px;
    border:1px solid #d1d5db;
    border-radius:10px;
    font-weight:600;
    text-align:right;
}
.sr-redeem__right{display:flex;align-items:center;gap:12px}
.sr-redeem__numbers{display:flex;align-items:center;gap:8px;font-size:14px}
.sr-details summary{cursor:pointer;color:#374151}
.sr-table{width:100%}
.sr-table th,.sr-table td{padding:10px 8px;border-bottom:1px solid #f3f4f6}
.sr-muted{color:#6b7280}
.text-right{text-align:right}

/* ------------------------------------------------------------------ */
/* My Account – Left Navigation Refinements                           */
/* ------------------------------------------------------------------ */

/* Overall block styling for account navigation (groups like "My account", "Rewards") */
.block-account-navigation {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #f9fafb;
    margin-bottom: 15px;
    overflow: hidden;
}

.block-account-navigation .title {
    padding: 14px 18px 10px 18px;
    border-bottom: 1px solid #e5e7eb;
    background: #f3f4f6;
}

.block-account-navigation .title strong {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #4b5563;
}

.block-account-navigation .listbox {
    padding: 4px 0;
}

/* Remove bullets and tighten spacing between menu items */
.block-account-navigation .list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.block-account-navigation .list li {
    margin: 0;
}

/* Base link appearance – subtle, compact, fully left-aligned */
.block-account-navigation .list li a {
    display: block;
    position: relative;
    padding: 7px 18px 7px 22px;
    font-size: 13px;
    color: #4b5563;
    text-decoration: none;
    transition:
        background-color .18s ease,
        color .18s ease,
        padding-left .18s ease,
        transform .18s ease;
}

/* Small vertical accent bar that animates in on hover/active */
.block-account-navigation .list li a::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 50%;
    width: 3px;
    height: 0;
    background-color: #9ca3af;
    border-radius: 999px;
    transform: translateY(-50%);
    transition: height .18s ease;
}

/* Hover / focus – subtle motion and shade change, all greys */
.block-account-navigation .list li a:hover,
.block-account-navigation .list li a:focus {
    background-color: #f3f4f6;
    padding-left: 24px;
    color: #374151;
    transform: translateX(1px);
}

.block-account-navigation .list li a:hover::before,
.block-account-navigation .list li a:focus::before {
    height: 60%;
}

/* Active item – slightly stronger background and left accent */
.block-account-navigation .list li.active a,
.block-account-navigation .list li a.active {
    background-color: #e5e7eb;
    color: #111827;
    font-weight: 600;
    padding-left: 24px;
}

.block-account-navigation .list li.active a::before,
.block-account-navigation .list li a.active::before {
    height: 70%;
    background-color: #6b7280;
}

/* Make sure any "inactive" class still uses the modern look */
.block-account-navigation .list li.inactive a,
.block-account-navigation .list li a.inactive {
    opacity: 0.9;
}

/* Slightly tighter layout on very small screens */
@media (max-width:640px){
    .block-account-navigation {
        margin-bottom: 12px;
    }

    .block-account-navigation .list li a {
        padding-top: 6px;
        padding-bottom: 6px;
    }
}

/* Modal Styles */
.sr-modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.4); 
}

.sr-modal-content {
    background-color: #fefefe;
    margin: 15% auto; 
    padding: 0;
    border: 1px solid #888;
    width: 40%; 
    border-radius: 8px;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
}

.sr-modal-header {
    padding: 15px 20px;
    background-color: #f0f2f5;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sr-modal-header h3 { margin: 0; font-size: 18px; }

.sr-close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.sr-close:hover,
.sr-close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.sr-modal-body {padding: 20px;}

.sr-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e5e7eb;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.alert { padding: 15px; margin-bottom: 20px; border: 1px solid transparent; border-radius: 4px; }
.alert-success { color: #3c763d; background-color: #dff0d8; border-color: #d6e9c6; }
.alert-danger { color: #a94442; background-color: #f2dede; border-color: #ebccd1; }

/* Gem Badge Styles - use Snappy emblem image, hide Font Awesome gem */
.sr-gem-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    transform: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background-image: url('../images/snappy-rand-emblem.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 10;
    cursor: default;
}
.sr-gem-icon {
    display: none !important; /* hide FA gem, we use the emblem background instead */
}
.sr-gem-text {
    position: relative;
    top: -4px; /* nudge number slightly higher inside the emblem */
    width: 100%;
    text-align: center;
    color: #000;
    font-weight: 700;
    font-size: 10px;
    line-height: 1;
    z-index: 11;
}

/* Cart Item override for gem badge */
.sr-cart-badge.sr-gem-badge {
    position: static;
    transform: none;
    display: inline-flex;
    vertical-align: middle;
    margin-left: 5px;
}

.sr-cart-badge .sr-gem-text {
    top: -3px; /* move cart entry points slightly higher */
}

@media (max-width:640px){
    .sr-kpis{flex-direction:column}
    .sr-redeem{flex-direction:column;align-items:flex-start}
    .sr-redeem__right{align-self:stretch;justify-content:space-between;width:100%}
    .sr-program-metrics{flex-direction:column}
    .sr-program-metric{min-width:100%}
    .sr-slider-row{flex-direction:column;align-items:flex-start;width:100%}
    .sr-slider-row input[type=number]{width:100%}
    .sr-modal-content { width: 90%; }
}

/* Snappy Grid Badge */
.snappy-grid-badge {
    position: absolute;
    bottom: 0; 
    right: 0;
    width: 35px;
    height: 35px;
    background-image: url('../images/snappy-rand-emblem.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-weight: 700;
    font-size: 12px;
    z-index: 99;
    /* Pin badge to bottom-right of the product image */
    transform: none;
    /* Ensure it displays even if display:none was toggled */
    display: flex !important; 
}

/* Ensure cart/checkout totals sit to the right.
   Use high specificity and !important to win over other plugins/themes. */
.cart-footer .totals,
.checkout-page .cart-footer .totals,
.order-summary-content .cart-footer .totals {
    float: right !important;
    text-align: right !important;
}

.cart-footer .totals table,
.cart-footer .totals td,
.cart-footer .totals th,
.cart-footer .totals .cart-total-right {
    text-align: right !important;
}

/* Ensure account/order details totals align to the right as well */
.details-page-cart .totals,
.details-page-cart td.cart-total-right,
.details-page-cart .cart-total-right {
    text-align: right !important;
}

/* Consent & Privacy */
.sr-alert {
    padding: 12px 16px;
    border-radius: 8px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    margin-bottom: 20px;
}

.sr-consent-alert {
    border: 1px solid #fde68a;
    background: #fffbeb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.sr-consent-alert h3 {
    margin-top: 0;
    color: #92400e;
}

.sr-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0px;
}

.sr-consent-actions form {
    display: inline-block;
}

.sr-consent-terms {
    font-size: 13px;
    color: #78350f;
    margin: 0;
    text-align:left;
}

.sr-consent-status {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

.sr-consent-label {
    font-weight: 600;
    margin-right: 8px;
}

.sr-consent-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.sr-consent-chip--success {
    background: #ecfdf5;
    color: #047857;
}

.sr-consent-chip--danger {
    background: #fef2f2;
    color: #b91c1c;
}

.sr-consent-chip--neutral {
    background: #f3f4f6;
    color: #4b5563;
}

.sr-initiative-content {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.sr-consent-manage {
    margin-bottom: 20px;
}

.sr-consent-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.sr-consent-log h4 {
    margin-top: 0;
}

.sr-consent-log__list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.sr-consent-log__list li {
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
}

.sr-consent-log__notes {
    font-size: 13px;
    color: #4b5563;
}

.sr-consent-manage-btn {
    border: 1px solid var(--sr-primary, #2563eb);
    color: var(--sr-primary, #2563eb);
    background: #fff;
    border-radius: 999px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
}

.sr-consent-manage-btn:hover {
    background: var(--sr-primary, #2563eb);
    color: #fff;
}

.sr-consent-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    margin-bottom: 16px;
    font-size: 14px;
    color: #92400e;
}

.sr-consent-banner__btn {
    border: none;
    background: #f97316;
    color: #fff;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s ease;
}

.sr-consent-banner__btn:hover {
    opacity: .9;
}

.sr-consent-chip--warning {
    background: #fff7ed;
    color: #c2410c;
    margin-bottom:0px;
}

.sr-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    /* Ensure modal + overlay sit above any site header/toolbars */
    z-index: 999999;
}

.sr-modal.is-visible {
    display: flex;
}

.sr-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    /* Explicitly sit behind the dialog but above page content */
    z-index: 0;
}

.sr-modal__dialog {
    position: relative;
    background: #fff;
    border-radius: 18px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.25);
    padding: 28px 28px 32px;
    /* Above the overlay within the modal stacking context */
    z-index: 1;
}

.sr-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    border: none;
    background: transparent;
    font-size: 24px;
    color: #475467;
    cursor: pointer;
}

.sr-modal__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

body.sr-modal-open {
    overflow: hidden;
}
.sr-history-modal__header{
    display:flex;
    justify-content:flex-start;
    gap:16px;
    align-items:center;
    text-align: left;
}
.sr-history-modal__header p {
    margin: 0px;
}

.sr-history-balance{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    padding:14px 16px;
    border:1px solid #e5e7eb;
    border-radius:12px;
    background:#f9fafb;
    text-align:left;
}

.sr-history-balance .sr-muted {
    font-weight: bold;
}

.sr-history-balance strong{
    font-size:24px;
    color:var(--sr-primary,#2563eb);
}
.sr-history-expiring{
    border:1px solid #fde68a;
    background:#fffbeb;
    border-radius:12px;
    padding:14px 16px;
    display:flex;
    flex-direction:column;
    gap:8px;
    text-align:left;
}
.sr-history-expiring__item{
    display:flex;
    justify-content:space-between;
    font-weight:600;
    color:#92400e;
}
.sr-history-scroll{
    max-height:260px;
    overflow:auto;
    border:1px solid #e5e7eb;
    border-radius:12px;
}
.sr-history-scroll table{
    width:100%;
    border-collapse:collapse;
}
.sr-history-scroll th,
.sr-history-scroll td{
    padding:10px 12px;
    border-bottom:1px solid #f3f4f6;
    font-size:13px;
}
.sr-history-scroll tr:last-child td{
    border-bottom:none;
}
.sr-history-empty{
    padding:12px 4px;
    color:#6b7280;
    font-size:13px;
    text-align:center;
}
.sr-totals-padded{
    padding:24px 24px 30px;
    border-radius:16px;
    background:#fff;
    box-sizing:border-box;
}
.sr-totals-padded .checkout-buttons,
.sr-totals-padded .cart-cash-price-banner,
.sr-totals-padded .terms-of-service{
    margin-top:18px;
}

.sr-consent-modal__header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 16px;
    text-align:left;
}

.sr-modal-logo {
    width: 41px;
    height: 34px;
}

.sr-consent-highlight {
    border: 1px solid #e0e7ff;
    background: #eef2ff;
    color: #312e81;
    padding: 14px;
    border-radius: 12px;
    text-align:left;
}

.sr-consent-highlight p {
    margin-bottom: 0px;
}

.sr-consent-highlight--success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.sr-consent-highlight--muted {
    border-color: #e5e7eb;
    background: #f9fafb;
    color: #374151;
}

.sr-consent-initiative {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    background: #f9fafb;
    font-size: 13px;
    text-align:left;
}
.sr-consent-initiative p {
    margin-bottom: 0px;
}

.sr-consent-form .button-1 {
    min-width: 160px;
}

.button-1.btn-outline-danger {
    background: transparent;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

.button-1.btn-outline-danger:hover {
    background: #fee2e2;
}

.sr-consent-feedback {
    font-size: 13px;
    color: #166534;
    min-height: 18px;
}

.sr-consent-feedback--error {
    color: #b91c1c;
}

.sr-terms-body .sr-card {
    margin-bottom: 20px;
}

@media (max-width:768px) {
    .sr-consent-actions,
    .sr-consent-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .sr-consent-actions form,
    .sr-consent-buttons form {
        width: 100%;
    }

    .sr-consent-actions .btn,
    .sr-consent-buttons .btn {
        width: 100%;
    }

    .sr-consent-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .sr-consent-banner__btn {
        width: 100%;
        text-align: center;
    }

    .sr-modal__dialog {
        padding: 24px;
    }
}

/* Terms & Conditions Page Refinements */
.snappy-terms-page .page-title h1 {
    font-size: 24px;
    margin-bottom: 24px;
    font-weight: 600;
    color: #111827;
}

.sr-terms-card {
    border: none;
    box-shadow: none;
    background: transparent;
    margin: 0 0 30px 0;
}

.sr-terms-card .sr-card__header {
    background: transparent;
    border-bottom: none;
    padding: 0 0 12px 0;
}

.sr-terms-card .sr-card__header h3 {
    font-size: 18px;
    color: #374151;
    font-weight: 600;
}

.sr-terms-card .sr-card__body {
    padding: 0;
}

/* Table Styling */
.sr-terms-table-wrapper {
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,.06); 
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e7eb;
    margin-top: 10px;
}

.sr-terms-table {
    width: 100%;
    border-collapse: collapse;
}

.sr-terms-table th {
    background: #f9fafb;
    text-align: left;
    padding: 18px 24px;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e5e7eb;
}

.sr-terms-table td {
    padding: 18px 24px;
    border-bottom: 1px solid #f3f4f6;
    color: #1f2937;
    font-size: 14px;
    vertical-align: top;
}

.sr-terms-table tr:last-child td {
    border-bottom: none;
}

.sr-terms-body p {
    margin-bottom: 16px;
    line-height: 1.6;
    color: #4b5563;
    font-size: 15px;
}

.sr-consent-actions button {
    padding: 10px;
}

button#sr-apply-points {
    padding: 5px;
}