/* WebC Rewards frontend estilos (BEM).
   Paleta NorthSpices: verde #2cad6e, amarillo #fcea0d, negro #1e1e1e, crema #fffcdf.
   Tipografía Montserrat. Bordes negros + sombra dura (3px 3px 0 negro) al estilo del theme. */

/* -------------------------------------------------------------
   Pestaña "Mis recompensas" en Mi Cuenta
   ------------------------------------------------------------- */

.webc-rewards-account {
    max-width: 800px;
    margin: 0 auto;
    font-family: var(--theme-font, 'Montserrat', sans-serif);
}

.webc-rewards-account__title {
    font-size: 26px;
    font-weight: 700;
    color: var(--theme-black, #1e1e1e);
    margin-bottom: 24px;
    line-height: 1.1;
}

/* Resumen */
.webc-rewards-summary {
    margin-bottom: 32px;
}

.webc-rewards-summary__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.webc-rewards-summary__card {
    background: var(--theme-white, #fff);
    border: 2px solid var(--theme-black, #1e1e1e);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 3px 3px 0 0 var(--theme-black, #1e1e1e);
    transition: transform 0.15s, box-shadow 0.15s;
}

.webc-rewards-summary__card:hover {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 0 var(--theme-black, #1e1e1e);
}

.webc-rewards-summary__card--balance {
    background: var(--verde-claro-2-norths, #E5FFF2);
}

.webc-rewards-summary__card .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: var(--verde-norths, #2cad6e);
    margin-bottom: 8px;
}

.webc-rewards-summary__card--balance .dashicons {
    color: var(--verde-norths-dark, #0C5330);
    font-size: 28px;
    width: 28px;
    height: 28px;
}

.webc-rewards-summary__label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--theme-gray, #808080);
    margin: 0 0 4px;
    font-weight: 600;
}

.webc-rewards-summary__value {
    font-size: 24px;
    font-weight: 700;
    color: var(--theme-black, #1e1e1e);
    margin: 0;
}

.webc-rewards-summary__card--balance .webc-rewards-summary__value {
    color: var(--verde-norths-dark, #0C5330);
}

/* Secciones (historial, cupones) */
.webc-rewards-section {
    margin-bottom: 32px;
}

.webc-rewards-section__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--theme-black, #1e1e1e);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--verde-claro-norths, #98E9C1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.webc-rewards-section__title .dashicons {
    color: var(--verde-norths, #2cad6e);
}

.webc-rewards-empty {
    color: var(--theme-gray, #808080);
    font-size: 14px;
    padding: 24px;
    text-align: center;
    background: var(--amarillo-claro-crema, #fffcdf);
    border-radius: 10px;
    border: 2px dashed var(--theme-black, #1e1e1e);
}

/* Tabla de movimientos */
.webc-rewards-table-wrap {
    overflow-x: auto;
}

.webc-rewards-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.webc-rewards-table thead th {
    background: var(--verde-claro-2-norths, #E5FFF2);
    font-weight: 600;
    color: var(--verde-norths-dark, #0C5330);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.04em;
    padding: 10px 14px;
    text-align: left;
    border-bottom: 2px solid var(--theme-black, #1e1e1e);
}

.webc-rewards-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--verde-claro-norths, #98E9C1);
    vertical-align: middle;
}

.webc-rewards-table tbody tr:hover {
    background: var(--verde-claro-2-norths, #E5FFF2);
}

.webc-rewards-table .text-right {
    text-align: right;
}

.webc-rewards-cell-date {
    white-space: nowrap;
    color: var(--theme-gray, #808080);
}

.webc-rewards-cell-reason {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.webc-rewards-positive { color: var(--verde-norths, #2cad6e); font-weight: 600; }
.webc-rewards-negative { color: #ef4444; font-weight: 600; }

/* Badges */
.webc-rewards-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.webc-rewards-badge--earn      { background: #d1fae5; color: #065f46; }
.webc-rewards-badge--redeem     { background: #dbeafe; color: #1e40af; }
.webc-rewards-badge--adjust     { background: #e2e8f0; color: #475569; }
.webc-rewards-badge--bonus      { background: var(--amarillo-claro-norths, #FFF8AE); color: var(--theme-black, #1e1e1e); }
.webc-rewards-badge--penalty    { background: #fee2e2; color: #991b1b; }
.webc-rewards-badge--completed  { background: #d1fae5; color: #065f46; }
.webc-rewards-badge--expired     { background: #e2e8f0; color: #475569; }

/* Cupones */
.webc-rewards-coupons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.webc-rewards-coupon {
    border: 2px solid var(--theme-black, #1e1e1e);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    background: var(--theme-white, #fff);
    box-shadow: 3px 3px 0 0 var(--theme-black, #1e1e1e);
}

.webc-rewards-coupon.is-active {
    border-color: var(--verde-norths, #2cad6e);
    background: var(--verde-claro-2-norths, #E5FFF2);
}

.webc-rewards-coupon.is-used {
    opacity: 0.6;
}

.webc-rewards-coupon__code code {
    font-size: 16px;
    font-weight: 700;
    background: var(--amarillo-claro-crema, #fffcdf);
    padding: 8px 16px;
    border-radius: 8px;
    display: inline-block;
    letter-spacing: 0.05em;
    color: var(--theme-black, #1e1e1e);
}

.webc-rewards-coupon__status {
    margin-top: 8px;
}

/* -------------------------------------------------------------
   Panel de puntos en WooCommerce Blocks (Cart + Checkout)
   ------------------------------------------------------------- */

.wc-block-webc-rewards {
    background: var(--theme-white, #fff);
    border: 2px solid var(--theme-black, #1e1e1e);
    border-radius: 10px;
    padding: 20px 24px;
    margin: 16px 0;
    box-shadow: 3px 3px 0 0 var(--theme-black, #1e1e1e);
}

.wc-block-webc-rewards__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--verde-norths-dark, #0C5330);
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--verde-claro-norths, #98E9C1);
}

.wc-block-webc-rewards__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wc-block-webc-rewards__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    font-size: 14px;
}

.wc-block-webc-rewards__label {
    color: var(--theme-gray, #808080);
    font-size: 13px;
}

.wc-block-webc-rewards__value {
    color: var(--theme-black, #1e1e1e);
    font-weight: 600;
}

.wc-block-webc-rewards__value--success {
    color: var(--verde-norths, #2cad6e);
}

.wc-block-webc-rewards__form {
    margin-top: 12px;
}

.wc-block-webc-rewards__label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--theme-gray, #808080);
    margin-bottom: 6px;
    font-weight: 600;
}

.wc-block-webc-rewards__input-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.wc-block-webc-rewards__input {
    flex: 1 1 120px;
    min-width: 120px;
    padding: 8px 12px;
    border: 1px solid var(--theme-black, #1e1e1e);
    border-radius: 8px;
    font-size: 14px;
    background: var(--theme-white, #fff);
}

.wc-block-webc-rewards__input:focus {
    border-color: var(--verde-norths, #2cad6e);
    outline: none;
    box-shadow: 0 0 0 3px rgba(44, 173, 110, 0.15);
}

.wc-block-webc-rewards__button {
    padding: 8px 20px;
    border: 2px solid var(--theme-black, #1e1e1e);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

/* Botones thm-btn dentro del panel de Blocks */
.wc-block-webc-rewards .thm-btn {
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
}

.wc-block-webc-rewards__button--apply {
    background: var(--verde-norths, #2cad6e);
    color: var(--theme-black, #1e1e1e);
}

.wc-block-webc-rewards__button--apply:hover {
    background: var(--theme-black, #1e1e1e);
    color: var(--theme-white, #fff);
}

.wc-block-webc-rewards__button--remove {
    background: var(--theme-white, #fff);
    color: var(--theme-black, #1e1e1e);
}

.wc-block-webc-rewards__button--remove:hover {
    background: var(--amarillo-claro-norths, #FFF8AE);
}

.wc-block-webc-rewards__feedback {
    margin-top: 8px;
    min-height: 1.5rem;
}

.wc-block-webc-rewards__feedback--success {
    color: var(--verde-norths, #2cad6e);
    font-size: 13px;
    padding: 6px 0;
}

.wc-block-webc-rewards__feedback--error {
    color: #ef4444;
    font-size: 13px;
    padding: 6px 0;
}

.wc-block-webc-rewards__notice {
    font-size: 13px;
    color: var(--theme-gray, #808080);
    margin: 8px 0 0;
    padding: 8px 12px;
    background: var(--amarillo-claro-crema, #fffcdf);
    border-radius: 8px;
}