/**
 * Estilos para LP Form NewsAuth
 * Compatible con tema Herald/Meks
 */

/* ============================================
   VARIABLES Y RESET
   ============================================ */
:root {
    --lp-primary: #d92123;
    --lp-primary-dark: #b01d1f;
    --lp-secondary: #222222;
    --lp-success: #10b981;
    --lp-error: #ef4444;
    --lp-warning: #ff6900;;
    --lp-border: #e5e7eb;
    --lp-text: #374151;
    --lp-text-light: #6b7280;
    --lp-bg-light: #f9fafb;
}

/* ============================================
   CONTENEDORES DE FORMULARIOS
   ============================================ */
.lp-newsauth-form-container {
    max-width: 480px;
    margin: 10px auto;
    padding: 0 5px;
}

.lp-newsauth-form-box {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.lp-newsauth-form-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 30px;
    color: var(--lp-secondary);
    text-align: center;
}

/* ============================================
   TABS DE AUTENTICACIÓN
   ============================================ */
.lp-auth-tabs {
    display: flex;
    gap: 0;
    margin: -40px -20px 30px -20px;
    border-bottom: 2px solid var(--lp-border);
}

.lp-auth-tab {
    flex: 1;
    background: var(--lp-bg-light);
    border: none;
    padding: 16px 24px;
    font-size: 15px;
    font-weight: 600;
    color: var(--lp-text-light);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.lp-auth-tab:first-child {
    border-radius: 8px 0 0 0;
}

.lp-auth-tab:last-child {
    border-radius: 0 8px 0 0;
}

.lp-auth-tab svg {
    width: 18px;
    height: 18px;
}

.lp-auth-tab:hover {
    background: #fff;
    color: var(--lp-primary);
}

.lp-auth-tab.active {
    background: #fff;
    color: var(--lp-primary);
    border-bottom-color: var(--lp-primary);
}

.lp-auth-form-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.lp-auth-form-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   FORMULARIOS
   ============================================ */
.lp-newsauth-form {
    margin: 0;
}

.lp-form-group {
    margin-bottom: 10px;
}

.lp-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--lp-secondary);
}

.lp-form-group input[type="text"],
.lp-form-group input[type="email"],
.lp-form-group input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid var(--lp-border);
    border-radius: 6px;
    transition: all 0.2s;
}

.lp-form-group input:focus {
    outline: none;
    border-color: var(--lp-primary);
    box-shadow: 0 0 0 3px rgba(217, 33, 35, 0.1);
}

.lp-form-error {
    display: block;
    color: var(--lp-error);
    font-size: 13px;
    margin-top: 6px;
}

.lp-form-help {
    display: block;
    color: var(--lp-text-light);
    font-size: 13px;
    margin-top: 4px;
}

.lp-form-footer {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--lp-border);
    text-align: center;
}

.lp-form-footer p {
    margin: 0;
    color: var(--lp-text);
}

.lp-form-footer a {
    color: var(--lp-primary);
    text-decoration: none;
    font-weight: 600;
}

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

/* Toggle de contraseña */
.lp-form-group {
    position: relative;
}

.lp-password-toggle {
    position: absolute;
    right: 12px;
    top: 38px; /* Ajustar según la altura del label */
    background: none;
    border: none;
    color: #7f8c8d;
    cursor: pointer;
    padding: 0 8px 3px 8px;
    font-size: 16px;
    transition: color 0.2s;
    z-index: 10;
}

.lp-password-toggle:hover {
    color: #2c3e50;
}

.lp-password-toggle:focus {
    outline: 2px solid #ff6900;
    outline-offset: 2px;
    border-radius: 3px;
}

/* Ajustar padding del input para el botón */
.lp-form-group input[type="password"],
.lp-form-group input[type="text"] {
    padding-right: 45px;
}



/* ============================================
   BOTONES
   ============================================ */
.lp-btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.lp-btn-primary {
    background: var(--lp-primary);
    color: #fff;
    width: 100%;
}

.lp-btn-primary:hover:not(:disabled) {
    background: var(--lp-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(217, 33, 35, 0.3);
}

.lp-btn-secondary {
    background: var(--lp-warning) !important;
    color: #ffffff !important;
    border: 1px solid var(--lp-border);
}

.lp-btn-secondary:hover:not(:disabled) {
    background: var(--lp-primary-dark) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(217, 33, 35, 0.3);
}

.lp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.lp-btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.lp-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.lp-spinner-small {
    width: 14px;
    height: 14px;
    border-width: 2px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   ALERTAS
   ============================================ */
.lp-alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.lp-alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.lp-alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.lp-alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

/* ============================================
   PLANES
   ============================================ */
.lp-planes-container {
    max-width: 1200px;
    margin: 0;
    padding: 0 5px;
}

.lp-planes-header {
    text-align: center;
    margin-bottom: 50px;
}

.lp-planes-header h2 {
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 16px;
    color: var(--lp-secondary);
}

.lp-planes-header p {
    font-size: 18px;
    color: var(--lp-text-light);
    margin: 0;
}

.lp-planes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.lp-plan-card {
    background: #fff;
    border: 2px solid var(--lp-border);
    border-radius: 12px;
    padding: 32px;
    position: relative;
    transition: all 0.3s;
}

.lp-plan-card:hover {
    border-color: var(--lp-primary);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.lp-plan-featured {
    border-color: var(--lp-primary);
    box-shadow: 0 10px 40px rgba(217, 33, 35, 0.15);
}

.lp-plan-badge {
    position: absolute;
    top: -12px;
    right: 24px;
    background: var(--lp-primary);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.lp-plan-header h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--lp-secondary);
}

.lp-plan-description {
    font-size: 15px;
    color: var(--lp-text-light);
    margin: 0 0 24px;
}

.lp-plan-price {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--lp-border);
}

.lp-price-amount {
    display: block;
    font-size: 42px;
    font-weight: 700;
    color: var(--lp-secondary);
    line-height: 1;
}

.lp-price-duration {
    display: block;
    font-size: 14px;
    color: var(--lp-text-light);
    margin-top: 8px;
}

.lp-plan-features {
    text-align: left;
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
}

.lp-plan-features ul {
    margin: 0px;
    padding: 0 25px !important;
}

.lp-plan-features li {
    margin-bottom: 12px;
    font-size: 15px;
    color: var(--lp-text);
}

.lp-plan-features svg {
    flex-shrink: 0;
    color: var(--lp-success);
    margin-top: 2px;
}

.lp-plan-action {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ============================================
   MODALES
   ============================================ */
.lp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.lp-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.lp-modal-content {
    position: relative;
    background: #fff;
    max-width: 500px;
    margin: 60px auto;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.lp-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: var(--lp-text-light);
    cursor: pointer;
    z-index: 10;
}

.lp-modal-close:hover {
    color: var(--lp-secondary);
}

.lp-modal-header {
    padding: 25px 0px 0px;
    text-align: center;
}

.lp-modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--lp-secondary);
}

.lp-modal-body {
    padding: 15px;
}

/* QR Modal específico */
.lp-qr-loading {
    text-align: center;
    padding: 40px 0;
}

.lp-qr-loading .lp-spinner {
    width: 40px;
    height: 40px;
    border-width: 4px;
    border-color: var(--lp-border);
    border-top-color: var(--lp-primary);
    margin: 0 auto 16px;
}

.lp-qr-loading p {
    color: var(--lp-text-light);
    margin: 0;
}

.lp-qr-image-container {
    text-align: center;
    margin-bottom: 0;
    font-size: 14px;
    color: var(--lp-text);
}

.lp-qr-image-container img {
    max-width: 300px;
    width: 100%;
    height: auto;
    border: 4px solid var(--lp-border);
    border-radius: 8px;
}

.lp-qr-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 0;
}

.lp-qr-actions .lp-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.lp-qr-status {
    text-align: center;
    padding: 0;
    margin: 0;
}

#lp-qr-polling {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--lp-text-light);
    font-size: 14px;
    margin: 0;
}


.lp-qr-success {
    text-align: center;
    padding: 40px 20px;
}

.lp-qr-success svg {
    margin-bottom: 24px;
}

.lp-qr-success h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--lp-success);
}

.lp-qr-success p {
    color: var(--lp-text);
    margin: 0 0 24px;
}

/* ============================================
   MI CUENTA
   ============================================ */
.lp-cuenta-container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 0;
}

.lp-cuenta-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.lp-cuenta-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: var(--lp-secondary);
}

.lp-cuenta-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid var(--lp-border);
    margin-bottom: 32px;
    overflow-x: auto;
}

.lp-tab-btn {
    background: none;
    border: none;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    color: var(--lp-text-light);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.lp-tab-btn:hover {
    color: var(--lp-primary);
}

.lp-tab-btn.active {
    color: var(--lp-primary);
    border-bottom-color: var(--lp-primary);
}

.lp-tab-content {
    display: none;
}

.lp-tab-content.active {
    display: block;
}

.lp-card {
    background: #fff;
    border: 1px solid var(--lp-border);
    border-radius: 8px;
    padding: 32px;
    margin-bottom: 24px;
}

.lp-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 24px;
    color: var(--lp-secondary);
}

.lp-cuenta-form .lp-form-group {
    margin-bottom: 20px;
}

.lp-cuenta-form button[type="submit"] {
    width: auto;
    min-width: 200px;
}

/* Suscripción */
.lp-suscripcion-card {
    background: var(--lp-bg-light);
    border-radius: 8px;
    padding: 24px;
    position: relative;
}

.lp-suscripcion-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--lp-success);
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.lp-suscripcion-card h4 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px;
    color: var(--lp-secondary);
}

.lp-suscripcion-card p {
    margin: 0 0 8px;
    color: var(--lp-text);
}

/* Puntos */
.lp-puntos-dashboard {
    text-align: center;
}

.lp-puntos-total {
    margin-bottom: 32px;
}

.lp-puntos-number {
    display: block;
    font-size: 64px;
    font-weight: 700;
    color: var(--lp-primary);
    line-height: 1;
}

.lp-puntos-label {
    display: block;
    font-size: 16px;
    color: var(--lp-text-light);
    margin-top: 8px;
}

.lp-puntos-list {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.lp-puntos-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--lp-border);
    color: var(--lp-text);
}

.lp-puntos-list li:last-child {
    border-bottom: none;
}

/* Lector Stats */
.lp-lector-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.lp-stat-item {
    text-align: center;
    padding: 24px;
    background: var(--lp-bg-light);
    border-radius: 8px;
}

.lp-stat-number {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: var(--lp-primary);
    margin-bottom: 8px;
}

.lp-stat-label {
    display: block;
    font-size: 14px;
    color: var(--lp-text-light);
}

/* Tabla de pagos */
.lp-table {
    width: 100%;
    border-collapse: collapse;
}

.lp-table th,
.lp-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--lp-border);
}

.lp-table th {
    font-weight: 600;
    color: var(--lp-secondary);
    background: var(--lp-bg-light);
}

.lp-table td {
    color: var(--lp-text);
}

.lp-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.lp-badge-completed {
    background: #d1fae5;
    color: #065f46;
}

.lp-badge-pending {
    background: #fef3c7;
    color: #92400e;
}

/* Utilidades */
.lp-loading {
    color: var(--lp-text-light);
    text-align: center;
}

.lp-text-muted {
    color: var(--lp-text-light);
}

.lp-text-error {
    color: var(--lp-error);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {

    .lp-planes-grid {
        grid-template-columns: 1fr;
    }
    
    .lp-cuenta-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .lp-cuenta-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .lp-modal-content {
        margin: 10px;
        max-height: calc(100vh - 40px);
    }
    
    .lp-modal-header,
    .lp-modal-body {
        padding: 15px;
    }
    
    .lp-lector-stats {
        grid-template-columns: 1fr;
    }
    
    .lp-table {
        font-size: 14px;
    }
    
    .lp-table th,
    .lp-table td {
        padding: 8px;
    }
}







/* ========================================
   VERIFICACIÓN DE CÓDIGO
   ======================================== */

.lp-verification-info {
    background: #e8f4fd;
    border-left: 4px solid #2196f3;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.lp-verification-info p {
    margin: 5px 0;
    font-size: 14px;
}

.lp-verification-email {
    font-weight: 600;
    color: #1976d2;
    font-size: 16px !important;
}

.lp-code-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 15px 0;
}

.lp-code-digit,
.lp-session-code-digit {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.3s;
    padding: 0 !important;
}

.lp-code-digit:focus,
.lp-session-code-digit:focus {
    outline: none;
    border-color: #ff6900;
    box-shadow: 0 0 0 3px rgba(255, 105, 0, 0.1);
}

.lp-verification-timer {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin: 10px 0;
}

.lp-link-btn {
    background: none;
    border: none;
    color: #ff6900;
    cursor: pointer;
    text-decoration: underline;
    font-size: 14px;
    padding: 0;
}

.lp-link-btn:disabled {
    color: #999;
    cursor: not-allowed;
    text-decoration: none;
}

/* ========================================
   MODAL SESIONES EXCEDIDAS
   ======================================== */

.lp-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.lp-modal.active {
    display: block;
}

.lp-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.lp-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    padding: 20px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
}

.lp-modal-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 22px;
}

.lp-modal-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

#sessions-step-1 {
    display: flex;
    gap: 10px;
    flex-direction: column;
}

#sessions-step-2 {
    text-align: center;
}

.lp-btn-secondary {
    background: #f5f5f5;
    color: #333;
}

.lp-btn-secondary:hover {
    background: #e0e0e0;
}

/* Responsive */
@media (max-width: 480px) {
    .lp-code-inputs {
        gap: 5px;
    }
    
    .lp-code-digit,
    .lp-session-code-digit {
        width: 40px;
        height: 50px;
        font-size: 20px;
    }
    
    .lp-modal-content {
        padding: 20px;
    }
}

/* ========================================
   QR VIEW - Reemplaza modal con inline view
   ======================================== */
.lp-qr-view {
    max-width: 600px;
    margin: 20px auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.lp-qr-header {
    text-align: center;
    margin-bottom: 0;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.lp-qr-header h3 {
    margin: 0;
    font-size: 24px;
    color: #1f2937;
    font-weight: 600;
}

.lp-qr-loading {
    text-align: center;
    padding: 60px 20px;
}

.lp-qr-loading .lp-spinner {
    width: 40px;
    height: 40px;
    border-width: 4px;
    margin: 0 auto 20px;
}

.lp-qr-loading p {
    color: #6b7280;
    font-size: 16px;
}

.lp-qr-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.lp-qr-image-container {
    text-align: center;
    padding: 20px 0 0 0;
    background: #f9fafb;
    border-radius: 8px;
    margin: 0;
}

.lp-qr-image-container img {
    max-width: 100%;
    width: 280px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.lp-qr-image-container p {
    margin: 15px 0 5px;
    color: #374151;
}

.lp-qr-image-container strong {
    color: #dc2626;
}

.lp-qr-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.lp-qr-actions .lp-btn {
    flex: 1;
    min-width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.lp-qr-actions svg {
    flex-shrink: 0;
}

.lp-qr-status {
    text-align: center;
    padding: 0;
}

.lp-qr-status #lp-qr-verify {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.lp-qr-status #lp-qr-polling {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: #f0fdf4;
    border-radius: 8px;
    margin: 10px 0 0 0;
}

.lp-qr-status #lp-qr-polling .lp-spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid #10b981;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.lp-qr-status #lp-qr-polling span {
    color: #059669;
    font-size: 14px;
}

.lp-qr-status #lp-qr-timer {
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

/* Success State */
.lp-qr-success {
    text-align: center;
    padding: 60px 20px;
}

.lp-qr-success svg {
    margin: 0 auto 25px;
}

.lp-qr-success h3 {
    font-size: 28px;
    color: #059669;
    margin: 0 0 15px;
    font-weight: 600;
}

.lp-qr-success p {
    color: #6b7280;
    font-size: 16px;
    margin: 0;
}

/* Invoice Form */
.lp-invoice-form {
    max-width: 500px;
    margin: 0 auto;
}

.lp-invoice-form h3 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 22px;
    color: #1f2937;
}

.lp-invoice-form .lp-form-group {
    margin-bottom: 20px;
}

.lp-invoice-form label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 500;
    font-size: 14px;
}

.lp-invoice-form input,
.lp-invoice-form select {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s;
}

.lp-invoice-form input:focus,
.lp-invoice-form select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.lp-invoice-form .lp-form-actions {
    margin-top: 30px;
}

.lp-invoice-form .lp-btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 16px;
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .lp-qr-view {
        margin: 20px 0;
        padding: 15px;
        border-radius: 8px;
    }
    
    .lp-qr-header h3 {
        font-size: 20px;
    }
    
    .lp-qr-image-container {
        padding: 15px;
    }
    
    .lp-qr-image-container img {
        width: 220px;
    }
    
    .lp-qr-actions {
        flex-direction: column;
    }
    
    .lp-qr-actions .lp-btn {
        width: 100%;
        min-width: auto;
    }
    
    .lp-qr-success {
        padding: 40px 15px;
    }
    
    .lp-qr-success svg {
        width: 60px;
        height: 60px;
    }
    
    .lp-qr-success h3 {
        font-size: 22px;
    }
    
    .lp-invoice-form {
        padding: 0;
    }
    
    .lp-invoice-form h3 {
        font-size: 20px;
    }
}

/* ========================================
   Tabla de Pagos Responsive
   ======================================== */

.lp-payments-wrapper {
    width: 100%;
}

/* Header de la tabla (solo desktop) */
.lp-payment-header {
    display: none;
}

/* Items de pago - Desktop: Grid horizontal como tabla */
.lp-payment-item {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr 1.5fr 1.5fr;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    align-items: center;
    transition: background-color 0.2s;
}

.lp-payment-item:hover {
    background-color: #f9fafb;
}

.lp-payment-item:last-child {
    border-bottom: none;
}

/* Estilos de columnas en desktop */
.lp-payment-date {
    font-size: 14px;
    color: #374151;
}

.lp-payment-plan {
    font-size: 14px;
    color: #111827;
    font-weight: 500;
}

.lp-payment-amount {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.lp-payment-status {
    font-size: 14px;
}

.lp-payment-invoice {
    font-size: 14px;
}

/* Links */
.lp-link-pagar,
.lp-link-factura,
.lp-link-actualizar-factura {
    color: #ff6900;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.lp-link-pagar:hover,
.lp-link-factura:hover,
.lp-link-actualizar-factura:hover {
    color: #e55a00;
    text-decoration: underline;
}

/* Badges de estado */
.lp-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
}

.lp-status-success {
    background-color: #d1fae5;
    color: #065f46;
}

.lp-status-error {
    background-color: #fee2e2;
    color: #991b1b;
}

.lp-status-warning {
    background-color: #fef3c7;
    color: #92400e;
}

/* ========================================
   RESPONSIVE: Mobile (≤ 768px)
   ======================================== */
@media (max-width: 768px) {
    /* Header visible en desktop */
    .lp-payment-header {
        display: none;
    }
    
    /* Items como cards verticales */
    .lp-payment-item {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 16px;
        margin-bottom: 12px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        background-color: #fff;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
    
    .lp-payment-item:hover {
        background-color: #fff;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    .lp-payment-item:last-child {
        border-bottom: 1px solid #e5e7eb;
    }
    
    /* Fecha destacada */
    .lp-payment-date {
        font-size: 15px;
        font-weight: 600;
        color: #111827;
        padding-bottom: 8px;
        border-bottom: 1px solid #f3f4f6;
    }
    
    /* Plan */
    .lp-payment-plan {
        font-size: 16px;
        font-weight: 600;
        color: #111827;
    }
    
    /* Monto con label */
    .lp-payment-amount::before {
        content: "Monto: ";
        font-weight: 400;
        color: #6b7280;
    }
    
    .lp-payment-amount {
        font-size: 15px;
        font-weight: 600;
        color: #111827;
    }
    
    /* Estado con label */
    .lp-payment-status::before {
        content: "Estado: ";
        font-weight: 400;
        color: #6b7280;
        margin-right: 8px;
    }
    
    .lp-payment-status {
        font-size: 15px;
    }
    
    /* Factura con label */
    .lp-payment-invoice::before {
        content: "Factura: ";
        font-weight: 400;
        color: #6b7280;
        margin-right: 8px;
    }
    
    .lp-payment-invoice {
        font-size: 15px;
    }
}

/* ========================================
   RESPONSIVE: Desktop (≥ 769px)
   ======================================== */
@media (min-width: 769px) {
    .lp-payment-header {
        display: grid;
        grid-template-columns: 2fr 2fr 1fr 1.5fr 1.5fr;
        gap: 16px;
        padding: 12px 16px;
        background-color: #f9fafb;
        border-bottom: 2px solid #e5e7eb;
        font-weight: 600;
        font-size: 14px;
        color: #374151;
        border-radius: 8px 8px 0 0;
    }
}