/* ============================================================
   Private Store User Approval — Estilos compartidos (admin + front)
   ============================================================ */

/* ---- Badges de estado ---- */
.psua-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.psua-badge--pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.psua-badge--approved {
    background: #d1e7dd;
    color: #0a3622;
    border: 1px solid #28a745;
}

.psua-badge--rejected {
    background: #f8d7da;
    color: #58151c;
    border: 1px solid #dc3545;
}

.psua-badge--suspended {
    background: #e2e3e5;
    color: #41464b;
    border: 1px solid #6c757d;
}

/* ---- Botones de acción en tabla ---- */
.psua-action-btn {
    margin-right: 4px !important;
    margin-bottom: 2px !important;
}

.psua-approve {
    color: #0a3622 !important;
}

.psua-reject {
    color: #58151c !important;
}

.psua-suspend {
    color: #41464b !important;
}

/* ---- Username en tabla ---- */
.psua-username {
    color: #6c757d;
    font-size: 12px;
}

/* ---- Notices admin ---- */
.psua-admin-notice {
    padding: 10px 15px;
    margin: 10px 0;
    border-left: 4px solid #0071a1;
    background: #fff;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

/* ============================================================
   Formularios front-end (registro / login)
   ============================================================ */

.psua-form-wrap {
    max-width: 640px;
    margin: 0 auto;
    font-family: inherit;
}

.psua-form {
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.psua-field {
    margin-bottom: 18px;
}

.psua-field label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    color: #24292f;
}

.psua-field input[type="text"],
.psua-field input[type="email"],
.psua-field input[type="password"],
.psua-field input[type="tel"],
.psua-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    color: #24292f;
    background: #fff;
    box-sizing: border-box;
    transition: border-color .2s, box-shadow .2s;
}

.psua-field input:focus {
    outline: none;
    border-color: #0969da;
    box-shadow: 0 0 0 3px rgba(9,105,218,.15);
}

.psua-field--checkbox label {
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.psua-field-row {
    display: flex;
    gap: 16px;
}

.psua-field-row .psua-field {
    flex: 1;
}

@media (max-width: 480px) {
    .psua-field-row {
        flex-direction: column;
        gap: 0;
    }
    .psua-form {
        padding: 20px;
    }
}

/* ---- Botón primario ---- */
.psua-btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .1s;
}

.psua-btn--primary {
    background: #0969da;
    color: #fff;
    width: 100%;
}

.psua-btn--primary:hover {
    background: #0550ae;
}

.psua-btn--primary:active {
    transform: scale(0.98);
}

/* ---- Notices en formularios ---- */
.psua-notice {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.psua-notice--error {
    background: #fff0f0;
    border: 1px solid #f97583;
    color: #86181d;
}

.psua-notice--success {
    background: #f0fff4;
    border: 1px solid #34d058;
    color: #165c25;
}

/* ---- Secciones del formulario ---- */
.psua-section {
    margin: 0 0 6px;
}

.psua-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #24292f;
    margin: 0 0 12px;
    padding: 0 0 6px;
    border-bottom: 1px solid #e1e4e8;
}

/* ---- Select dropdown ---- */
.psua-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2324292f' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

/* ---- Link "+ Añadir apartamento" ---- */
.psua-add-address2 {
    display: inline-block;
    font-size: 13px;
    color: #57606a;
    text-decoration: none;
    margin-bottom: 16px;
    cursor: pointer;
}

.psua-add-address2:hover {
    color: #0969da;
}

/* ---- Ajustes: Medios de pago por país ---- */
.psua-country-gateway-settings {
    max-width: 980px;
}

.psua-country-gateway-default,
.psua-country-gateway-row {
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    margin: 12px 0;
}

.psua-country-gateway-row--template {
    display: none;
}

.psua-country-gateway-row__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.psua-country-gateway-row__country {
    min-width: 260px;
}

.psua-gateway-checkbox-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 8px 16px;
}

.psua-gateway-checkbox-list label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

/* ---- Checkbox "Misma dirección" ---- */
.psua-same-billing-wrap {
    margin: 4px 0 20px;
}

.psua-same-billing-wrap label {
    font-size: 14px;
    color: #24292f;
}

.psua-same-billing-wrap input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #0969da;
    cursor: pointer;
}

/* ---- Sección de billing oculta ---- */
.psua-billing-section {
    margin-bottom: 20px;
}

/* ---- Footer del formulario ---- */
.psua-form-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: #57606a;
}

.psua-form-footer a {
    color: #0969da;
    text-decoration: none;
}

.psua-form-footer a:hover {
    text-decoration: underline;
}

/* ---- Precio oculto ---- */
.psua-hidden-price {
    color: #6c757d;
    font-style: italic;
    font-size: 0.95em;
}

/* ---- Página de estado ---- */
.psua-status-page {
    text-align: center;
    padding: 40px 20px;
    max-width: 500px;
    margin: 0 auto;
}

.psua-status-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.psua-status-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
}

.psua-status-message {
    color: #57606a;
    font-size: 15px;
    line-height: 1.6;
}

.psua-status-note {
    background: #f6f8fa;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    padding: 12px 16px;
    margin-top: 20px;
    text-align: left;
    font-size: 14px;
}

.psua-status-user {
    margin-top: 24px;
    font-size: 13px;
    color: #57606a;
}

.psua-status--pending .psua-status-title  { color: #856404; }
.psua-status--rejected .psua-status-title { color: #58151c; }
.psua-status--suspended .psua-status-title{ color: #41464b; }

/* ============================================================
   Bloqueo de edición de direcciones (checkout)
   ============================================================ */

.psua-field-locked input,
.psua-field-locked select,
.psua-field-locked textarea {
    background-color: #f5f5f5 !important;
    color: #777 !important;
    cursor: not-allowed !important;
    pointer-events: none;
    border-color: #ddd !important;
}

.psua-field-locked label {
    color: #999 !important;
}

.psua-checkout-address-notice {
    margin-bottom: 20px !important;
}

/* ============================================================
   Ocultar dropdown del carrito en hover (Astra)
   ============================================================ */

.ast-site-header-cart .ast-site-header-cart-data,
.ast-site-header-cart .widget_shopping_cart,
.astra-cart-drawer {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* ============================================================
   Metabox: Envío Internacional
   ============================================================ */

.psua-intl-shipping-metabox p {
    margin: 6px 0;
    font-size: 13px;
}

.psua-intl-shipping-metabox .psua-success {
    color: #0a3622;
    background: #d1e7dd;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
}

#psua-shipping-form label {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
}

#psua-shipping-form input[type="number"],
#psua-shipping-form textarea {
    width: 100%;
    box-sizing: border-box;
}

#psua-shipping-result {
    font-size: 13px;
}
