/* Estilos de Frontend para Gestión de Envíos y Pagos */

.csp-wrapper {
    max-width: 720px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #1e293b;
    box-sizing: border-box;
}

.csp-wrapper *, .csp-wrapper *:before, .csp-wrapper *:after {
    box-sizing: inherit;
}

.csp-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.08), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
    padding: 36px;
}

.csp-header {
    text-align: center;
    margin-bottom: 28px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 20px;
}

.csp-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0;
}

.csp-header p {
    font-size: 15px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* Banner de solicitud personalizada */
.csp-custom-banner {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 26px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.csp-custom-badge {
    background: #22c55e;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 999px;
    letter-spacing: 0.5px;
}

.csp-custom-title {
    font-weight: 600;
    color: #15803d;
    font-size: 15px;
    flex: 1 1 200px;
}

.csp-custom-price {
    font-size: 16px;
    color: #166534;
}

/* Títulos de sección */
.csp-section-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: #475569;
    margin: 24px 0 14px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid #e2e8f0;
}

/* Filas y columnas de formulario */
.csp-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.csp-col {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.csp-col-full {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.csp-row label, .csp-col label, .csp-col-full label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.csp-req {
    color: #ef4444;
    font-weight: 700;
}

.csp-row input[type="text"],
.csp-row input[type="email"],
.csp-row input[type="tel"],
.csp-row select,
.csp-row textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    color: #1e293b;
    background-color: #ffffff;
    transition: all 0.2s ease-in-out;
}

.csp-row input:focus,
.csp-row select:focus,
.csp-row textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.csp-help {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

/* Opciones de tarifa de envío */
.csp-pricing-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.csp-pricing-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    background: #ffffff;
    transition: all 0.2s ease;
}

.csp-pricing-card:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.csp-pricing-card.csp-selected {
    border-color: #3b82f6;
    background: #eff6ff;
    box-shadow: 0 0 0 1px #3b82f6;
}

.csp-pricing-card input[type="radio"] {
    margin-right: 12px;
    accent-color: #2563eb;
    transform: scale(1.15);
}

.csp-pricing-info {
    flex: 1;
}

.csp-pricing-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
}

.csp-pricing-tag {
    font-size: 15px;
    font-weight: 700;
    color: #1d4ed8;
    background: #dbeafe;
    padding: 4px 10px;
    border-radius: 6px;
}

/* Métodos de Pago */
.csp-payment-methods-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.csp-payment-option {
    display: flex;
    align-items: flex-start;
    padding: 14px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    background: #ffffff;
    transition: all 0.2s ease;
}

.csp-payment-option:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.csp-payment-option.csp-selected {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 1px #2563eb;
}

.csp-payment-option input[type="radio"] {
    margin: 3px 12px 0 0;
    accent-color: #2563eb;
    transform: scale(1.15);
}

.csp-payment-info {
    display: flex;
    flex-direction: column;
}

.csp-payment-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

.csp-payment-desc {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.csp-transfer-box {
    margin-top: 14px;
    padding: 14px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 6px;
    font-size: 13px;
    color: #92400e;
    line-height: 1.5;
}

.csp-free-box {
    margin-top: 15px;
    padding: 14px 18px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #15803d;
}

.csp-free-box span {
    font-size: 20px;
    font-weight: bold;
    background: #dcfce7;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Alertas */
.csp-alert {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 18px;
    display: none;
}

.csp-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

/* Botón de envío */
.csp-submit-container {
    margin-top: 28px;
    text-align: center;
}

.csp-btn-submit {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background: #2563eb;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.csp-btn-submit:hover {
    background: #1d4ed8;
}

.csp-btn-submit:active {
    transform: scale(0.99);
}

.csp-btn-submit:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}

.csp-privacy-text {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 10px;
}

/* Spinner */
.csp-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: csp-spin 0.8s linear infinite;
    display: inline-block;
}

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

/* Pantallas de Estado (Éxito / Error) */
.csp-status-screen {
    text-align: center;
    padding: 40px 20px;
}

.csp-icon-check, .csp-icon-cross {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
}

.csp-icon-check {
    background: #dcfce7;
    color: #16a34a;
}

.csp-icon-cross {
    background: #fee2e2;
    color: #dc2626;
}

.csp-status-screen h2 {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 10px 0;
}

.csp-status-screen p {
    font-size: 15px;
    color: #475569;
    line-height: 1.6;
    margin: 0 0 14px 0;
}

.csp-highlight {
    color: #2563eb;
}

.csp-muted {
    font-size: 13px !important;
    color: #64748b !important;
}

.csp-transfer-details-card {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 18px;
    margin: 20px auto;
    max-width: 480px;
    text-align: left;
}

.csp-transfer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px dashed #fcd34d;
    font-size: 14px;
}

.csp-transfer-row:last-child {
    border-bottom: none;
}

.csp-btn-primary {
    display: inline-block;
    padding: 10px 20px;
    background: #2563eb;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    margin-top: 15px;
}

/* Responsividad en móviles */
@media (max-width: 640px) {
    .csp-card {
        padding: 22px 18px;
        border-radius: 8px;
    }
    .csp-row {
        flex-direction: column;
        gap: 12px;
    }
}
