/* ==========================================================================
   Mongo Puntos — Estilos
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Badge en página de producto
   -------------------------------------------------------------------------- */

.mp-product-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fdf7f9;
    border-left: 2px solid #be0d57;
    padding: 8px 14px;
    font-size: .85rem;
    color: #555;
    line-height: 1.4;
    margin: 8px 0;
}

.mp-product-badge strong { color: #be0d57; }
.mp-product-badge a      { color: #be0d57; text-decoration: underline; }

/* --------------------------------------------------------------------------
   2. Checkout clásico — caja de canje
   -------------------------------------------------------------------------- */

.mp-redeem-box {
    border-top: 1px solid #f0e0e8;
    padding: 16px 0 8px;
    margin-bottom: 20px;
    font-size: .88rem;
}

.mp-redeem-box h3 {
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #999;
    margin: 0 0 10px;
}

.mp-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.mp-input-row input[type="number"] {
    width: 130px;
    padding: 7px 10px;
    border: 1px solid #ddd;
    border-radius: 2px;
    font-size: .88rem;
}

.mp-btn-apply {
    background: #be0d57 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 2px !important;
    padding: 7px 16px !important;
    font-size: .85rem !important;
    font-weight: 600 !important;
    cursor: pointer;
    letter-spacing: .04em;
}

.mp-btn-apply:hover:not(:disabled) { background: #9b0b47 !important; }
.mp-btn-apply:disabled              { opacity: .5; cursor: default; }

.mp-btn-remove {
    background: transparent !important;
    color: #999 !important;
    border: none !important;
    padding: 0 !important;
    font-size: .82rem !important;
    cursor: pointer;
    text-decoration: underline;
}

.mp-applied  { color: #2d6a2d; font-size: .88rem; }
.mp-hint     { font-size: .78rem; color: #aaa; margin: 6px 0 0; }

.mp-msg { margin-top: 8px; font-size: .85rem; }
.mp-msg.success { color: #2d6a2d; }
.mp-msg.error   { color: #c00; }

/* --------------------------------------------------------------------------
   3. Checkout de bloques — widget shortcode [mp_puntos_checkout]
   -------------------------------------------------------------------------- */

.mp-checkout-mount {
    margin-bottom: 16px;
}

.mp-checkout-block {
    border: 1px solid #8c8f94; /* misma intensidad que los bloques WC nativos */
    border-radius: 4px;
    padding: 16px 20px;
    background: #fff;
}

.mp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.mp-title {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #94a3b8;
}

.mp-badge {
    font-size: .75rem;
    font-weight: 700;
    color: #be0d57;
    border: 1px solid #f3c6d9;
    border-radius: 20px;
    padding: 2px 10px;
    background: #fdf2f7;
}

/* Body: texto de ahorro + botón en misma línea */
.mp-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.mp-saving-text {
    font-size: .88rem;
    color: #334155;
    flex: 1;
    min-width: 0;
}

.mp-saving-text strong {
    color: #be0d57;
    font-weight: 700;
}

/* Botón toggle Aplicar / Quitar */
.mp-toggle-btn {
    background: #be0d57 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 7px 16px !important;
    font-size: .78rem !important;
    font-weight: 700 !important;
    letter-spacing: .05em;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, opacity .15s;
    flex-shrink: 0;
}

.mp-toggle-btn:hover:not(:disabled) { background: #9b0b47 !important; }
.mp-toggle-btn:disabled             { opacity: .4; cursor: default; }

/* Estado "Quitar": botón outline */
.mp-toggle-btn--active {
    background: transparent !important;
    color: #94a3b8 !important;
    border: 1px solid #e2e8f0 !important;
    font-weight: 600 !important;
}

.mp-toggle-btn--active:hover:not(:disabled) {
    background: #fff5f5 !important;
    color: #be0d57 !important;
    border-color: #f3c6d9 !important;
}

/* Modo manual */
.mp-body--manual {
    flex-direction: column;
    align-items: stretch;
}

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

.mp-manual-row .mp-saving-text {
    font-size: .82rem;
    color: #94a3b8;
    flex: 1;
}

.mp-input {
    width: 100px;
    padding: 7px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: .88rem;
    color: #1e293b;
    background: #f8fafc;
    transition: border-color .15s;
    flex-shrink: 0;
}

.mp-input:focus {
    outline: none;
    border-color: #be0d57;
    background: #fff;
}

.mp-meta {
    font-size: .75rem;
    color: #94a3b8;
    margin: 8px 0 0;
}

/* Semi-auto (por si se usa) */
.mp-semiauto-msg {
    font-size: .88rem;
    color: #334155;
    margin: 0;
}

.mp-semiauto-msg strong { color: #be0d57; }

/* --------------------------------------------------------------------------
   4. Mi Cuenta — página Mis Puntos
   -------------------------------------------------------------------------- */

.mp-account-wrap { max-width: 760px; }

.mp-section-title {
    font-size: .9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #999;
    margin: 32px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

/* Cards row */
.mp-cards-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .mp-cards-row { grid-template-columns: 1fr; }
}

.mp-card {
    border: 1px solid #efefef;
    border-radius: 6px;
    padding: 20px 22px;
    background: #fff;
}

.mp-card--balance { border-top: 3px solid #be0d57; }
.mp-card--rate    { border-top: 3px solid #e8c4d4; }
.mp-card--cta     { border-top: 3px solid #f5f0f2; }

.mp-card__label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #aaa;
    margin-bottom: 8px;
}

.mp-card__value {
    font-size: 2rem;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1;
    margin-bottom: 4px;
}

.mp-card__unit { font-size: 1rem; font-weight: 400; color: #aaa; }

.mp-card__sub {
    font-size: .82rem;
    color: #888;
    margin-top: 4px;
}

.mp-card__btn {
    display: inline-block;
    margin-top: 14px;
    background: #be0d57;
    color: #fff !important;
    text-decoration: none !important;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .05em;
    padding: 8px 18px;
    border-radius: 2px;
}

.mp-card__btn:hover { background: #9b0b47; }

/* Progress bar */
.mp-progress {
    height: 4px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin: 14px 0 6px;
}

.mp-progress__bar {
    height: 100%;
    background: #be0d57;
    border-radius: 4px;
    transition: width .4s ease;
}

.mp-progress--sm { margin: 10px 0 4px; }

.mp-progress__labels {
    display: flex;
    justify-content: space-between;
    font-size: .72rem;
    color: #bbb;
}

/* Tabla historial */
.mp-history-wrap {
    overflow-x: auto;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
}

.mp-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
}

.mp-history-table th {
    padding: 10px 14px;
    text-align: left;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #aaa;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
}

.mp-history-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f7f7f7;
    color: #444;
    vertical-align: middle;
}

.mp-history-table tr:last-child td { border-bottom: none; }
.mp-history-table tr:hover td      { background: #fdf7f9; }

.mp-col-date { white-space: nowrap; color: #aaa; font-size: .8rem; }
.mp-col-desc { color: #666; }

.mp-pts-pos { font-weight: 700; color: #2d6a2d; white-space: nowrap; }
.mp-pts-neg { font-weight: 700; color: #c00;    white-space: nowrap; }

.mp-type-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 600;
    background: #f5f5f5;
    color: #888;
}

.mp-type-tag--purchase     { background: #fdf7f9; color: #be0d57; }
.mp-type-tag--redeem       { background: #f0f7f0; color: #2d6a2d; }
.mp-type-tag--revoke       { background: #fff5f5; color: #c00; }
.mp-type-tag--manual       { background: #fafafa; color: #888; }
.mp-type-tag--registration { background: #f5f0ff; color: #6b3fa0; }
.mp-type-tag--review       { background: #fff8e1; color: #b07a00; }
.mp-type-tag--guest_transfer { background: #e8f4fd; color: #0066aa; }

.mp-order-link { color: #be0d57; text-decoration: none; }
.mp-order-link:hover { text-decoration: underline; }
.mp-dash { color: #ddd; }

.mp-pagination {
    display: flex;
    gap: 4px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.mp-pagination__link,
.mp-pagination__current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #eee;
    border-radius: 2px;
    font-size: .82rem;
    text-decoration: none;
    color: #555;
}

.mp-pagination__current {
    background: #be0d57;
    border-color: #be0d57;
    color: #fff;
    font-weight: 700;
}

.mp-empty { color: #aaa; font-size: .9rem; }

/* --------------------------------------------------------------------------
   5. Dashboard de Mi Cuenta — card al 50%
   -------------------------------------------------------------------------- */

.mp-dashboard-card {
    width: 50%;
    border: 1px solid #efefef;
    border-top: 3px solid #be0d57;
    border-radius: 6px;
    padding: 22px 24px;
    background: #fff;
    box-sizing: border-box;
}

@media (max-width: 1024px) {
    .mp-dashboard-card { width: 100%; }
}

.mp-dashboard-card__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 6px;
}

.mp-dashboard-card__title {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #aaa;
}

.mp-dashboard-card__pts {
    font-size: .78rem;
    font-weight: 700;
    color: #be0d57;
    border: 1px solid #be0d57;
    border-radius: 20px;
    padding: 1px 9px;
}

.mp-dashboard-card__value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1;
}

.mp-dashboard-card__sub {
    font-size: .78rem;
    color: #aaa;
    margin: 3px 0 0;
}

.mp-dashboard-card__hint {
    font-size: .78rem;
    color: #aaa;
    margin: 4px 0 0;
}

.mp-dashboard-card__link {
    display: inline-block;
    margin-top: 16px;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #be0d57 !important;
    text-decoration: none !important;
}

.mp-dashboard-card__link:hover { text-decoration: underline !important; }

/* --------------------------------------------------------------------------
   6. Menú Mi Cuenta — icono WoodMart para Mis Puntos
   -------------------------------------------------------------------------- */

.woocommerce-MyAccount-navigation-link--mis-puntos a::before {
    content: "\f149";
    font-family: "woodmart-font";
    font-weight: 400;
    margin-right: 8px;
    font-size: 1em;
}
