/* ═══════════════════════════════════════════════════
   PP Simple Subscriptions — Frontend Styles
   ═══════════════════════════════════════════════════ */

/* ── Frontend: Precio ─────────────────────────────── */

.ppss-price-wrap {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
}

.ppss-period {
    font-size: 0.85em;
    color: #666;
    font-weight: 400;
}

.ppss-manual {
    font-size: 0.78em;
    color: #4b5563;
    font-weight: 500;
}

.ppss-signup {
    font-size: 0.78em;
    color: #888;
    font-weight: 400;
}

.ppss-trial {
    font-size: 0.78em;
    color: #888;
    font-weight: 400;
}

/* ── Mi Cuenta: Tabla de suscripciones ────────────── */

.ppss-subs-table {
    width: 100%;
    border-collapse: collapse;
}

.ppss-subs-table th {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid #e0e0e0;
    font-size: 0.9em;
    color: #555;
    white-space: nowrap;
}

.ppss-subs-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
    font-size: 0.92em;
}

.ppss-subs-table tbody tr:hover {
    background: #fafafa;
}

.ppss-subs-table td small {
    display: block;
    color: #888;
    margin-top: 2px;
}

/* ── Badges de estado ─────────────────────────────── */

.ppss-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.ppss-active {
    background: #dcfce7;
    color: #166534;
}

.ppss-badge.ppss-trial {
    background: #dbeafe;
    color: #1e40af;
    font-size: 0.8em;
}

.ppss-expired {
    background: #fee2e2;
    color: #991b1b;
}

.ppss-cancelled {
    background: #f3f4f6;
    color: #6b7280;
}

.ppss-onhold {
    background: #fef9c3;
    color: #854d0e;
}

/* ── Botones de acción ────────────────────────────── */

.ppss-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 180px;
}

.ppss-actions .button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 6px !important;
    width: 100%;
    padding: 6px 12px !important;
    font-size: 0.85em !important;
    text-decoration: none !important;
    text-align: center;
    box-sizing: border-box;
    line-height: 1.4 !important;
    cursor: pointer;
    transition: opacity 0.15s;
}

.ppss-actions .button:hover {
    opacity: 0.85;
}

.ppss-btn-renew {
    background: #7b68ee !important;
    color: #fff !important;
    border: 1px solid #7b68ee !important;
}

.ppss-btn-cancel {
    background: #fff !important;
    color: #cf222e !important;
    border: 1px solid #f0d0d0 !important;
}

.ppss-btn-cancel:hover {
    background: #fef2f2 !important;
    border-color: #cf222e !important;
}

.ppss-btn-order {
    background: #f5f5f5 !important;
    color: #444 !important;
    border: 1px solid #ddd !important;
}

.ppss-btn-order:hover {
    background: #eee !important;
}

/* ── Estado vacío ─────────────────────────────────── */

.ppss-empty {
    padding: 24px;
    text-align: center;
    border: 2px dashed #d0d0d0;
    border-radius: 8px;
    color: #888;
    font-size: 0.95em;
}

/* ── Responsive ───────────────────────────────────── */

@media screen and (max-width: 768px) {
    .ppss-subs-table thead {
        display: none;
    }

    .ppss-subs-table tr {
        display: block;
        margin-bottom: 16px;
        border: 1px solid #eee;
        border-radius: 8px;
        padding: 12px;
    }

    .ppss-subs-table td {
        display: block;
        border-bottom: none;
        padding: 6px 0;
    }

    .ppss-subs-table td::before {
        content: attr(data-title);
        display: block;
        font-weight: 600;
        font-size: 0.8em;
        color: #999;
        margin-bottom: 2px;
        text-transform: uppercase;
    }

    .ppss-actions {
        min-width: auto;
        margin-top: 8px;
    }
}
