.graftivo-rewards-account {
    max-width: 640px;
}

.graftivo-rewards-balance-card {
    background: #f8f8f8;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.graftivo-rewards-balance-amount {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.graftivo-rewards-balance-amount span {
    font-size: 15px;
    font-weight: 400;
    color: #666;
}

.graftivo-rewards-balance-value {
    margin: 6px 0 0;
    font-size: 14px;
    color: #444;
}

.graftivo-rewards-expiring-note {
    margin: 8px 0 0;
    font-size: 13px;
    color: #a0632b;
}

.graftivo-rewards-how-it-works {
    margin-bottom: 24px;
}

.graftivo-rewards-how-it-works h3 {
    margin-bottom: 8px;
}

.graftivo-rewards-how-it-works ul {
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
    color: #444;
}

.graftivo-rewards-how-it-works li {
    margin-bottom: 4px;
}

.graftivo-rewards-history-table {
    width: 100%;
    border-collapse: collapse;
}

.graftivo-rewards-history-table th,
.graftivo-rewards-history-table td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
}

.graftivo-rewards-positive {
    color: #2f8f2f;
    font-weight: 600;
}

.graftivo-rewards-negative {
    color: #b3261e;
    font-weight: 600;
}

.graftivo-rewards-pagination {
    margin-top: 12px;
}

.graftivo-rewards-pagination a,
.graftivo-rewards-page-current {
    display: inline-block;
    padding: 4px 9px;
    margin-right: 4px;
}

.graftivo-rewards-page-current {
    font-weight: 700;
}

.graftivo-rewards-balance,
.graftivo-rewards-applied,
.graftivo-rewards-apply {
    margin: 8px 0;
}

.graftivo-rewards-earn-preview {
    margin: 4px 0 12px;
    font-size: 14px;
    color: #2f8f2f;
    font-weight: 500;
}

/* Cart/checkout "you'll earn" row and the checkout "earn preview" row both
   live inside WooCommerce's totals table (tfoot), which right-aligns text —
   a text-align set directly on the element always wins over the inherited
   one, no specificity fight needed against WooCommerce's own tfoot rule. */
.graftivo-rewards-earn-preview-row td {
    padding: 12px 0;
    text-align: left;
}

/* Standalone checkout card — rendered under customer details (billing/
   shipping), outside the order-review table, so no WooCommerce table styles
   to fight here. Hidden entirely when card_markup() has nothing to show. */
.graftivo-rewards-card {
    margin: 20px 0;
    padding: 16px 18px;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    background: #f8f8f8;
}

.graftivo-rewards-card:empty {
    display: none;
}

.graftivo-rewards-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.graftivo-rewards-card-title {
    font-weight: 700;
}

.graftivo-rewards-card-balance {
    font-size: 14px;
    color: #444;
}

.graftivo-rewards-card-body {
    margin-top: 10px;
}

.graftivo-rewards-card-body p {
    margin: 0;
}

/* Amount select + Apply row: wraps to a second line on narrow viewports
   instead of squeezing the select down to an unusable width. */
.graftivo-rewards-redeem-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.graftivo-rewards-gift-icon {
    display: inline-flex;
    color: #2f8f2f;
    flex-shrink: 0;
}

.graftivo-rewards-amount-select {
    /* 16px mínimo: evita el auto-zoom de iOS en inputs de formulario (regla del proyecto) */
    font-size: 16px;
    flex: 1 1 140px;
    min-width: 140px;
    /* Sin esto, el <select> hereda el estilo nativo del SO/navegador para el
       dropdown de opciones — en modo oscuro del sistema (ej. macOS) eso sale
       con fondo negro, fuera de lugar en una card clara. background/color
       explícitos fuerzan el mismo look en cualquier tema del sistema. */
    background: #fff;
    color: #222;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px 8px;
}

.graftivo-rewards-amount-select option {
    background: #fff;
    color: #222;
}
