/* ============================================================
   CTM Payments — Frontend CSS
   ============================================================ */

/* ── FORMULARIO DE PAGO ─────────────────────────────────── */
.ctm-payment-form-container {
    max-width: 780px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ctm-payment-form {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,.1);
    overflow: hidden;
}

.ctm-form-title {
    background: linear-gradient(135deg, #1a237e, #0d47a1);
    color: #fff !important;
    margin: 0;
    padding: 24px 30px;
    font-size: 22px;
    font-weight: 700;
}

.ctm-form-section {
    padding: 24px 30px;
    border-bottom: 1px solid #f0f0f0;
}

.ctm-form-section h3 {
    margin: 0 0 18px;
    font-size: 16px;
    font-weight: 700;
    color: #1a237e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ctm-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.ctm-form-group {
    display: flex;
    flex-direction: column;
}

.ctm-form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.ctm-form-group input,
.ctm-form-group select {
    padding: 11px 14px;
    border: 1.5px solid #dde1e7;
    border-radius: 6px;
    font-size: 15px;
    color: #333;
    transition: border-color .25s, box-shadow .25s;
    background: #fafbfc;
}

.ctm-form-group input:focus,
.ctm-form-group select:focus {
    outline: none;
    border-color: #1565c0;
    box-shadow: 0 0 0 3px rgba(21,101,192,.12);
    background: #fff;
}

.ctm-importe-wrap {
    position: relative;
}

.ctm-importe-wrap input {
    padding-right: 36px;
    width: 100%;
    box-sizing: border-box;
}

.ctm-importe-wrap span {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-weight: 600;
}

/* ── SELECTOR DE PLANES ─────────────────────────────────── */
.ctm-plan-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.ctm-plan-card {
    cursor: pointer;
    display: block;
}

.ctm-plan-card input { display: none; }

.ctm-plan-inner {
    border: 2px solid #dde1e7;
    border-radius: 8px;
    padding: 14px;
    text-align: center;
    transition: all .2s;
    background: #fafbfc;
}

.ctm-plan-card input:checked + .ctm-plan-inner {
    border-color: #1565c0;
    background: #e8f0fe;
    box-shadow: 0 2px 8px rgba(21,101,192,.2);
}

.ctm-plan-inner strong { display: block; font-size: 14px; color: #333; margin-bottom: 6px; }
.ctm-plan-price { font-size: 18px; font-weight: 700; color: #1565c0; }

.ctm-periodo-toggle {
    font-size: 14px;
    color: #555;
    margin-top: 8px;
}

/* ── INFO BOX ───────────────────────────────────────────── */
.ctm-info-box {
    background: #e8f0fe;
    border-left: 4px solid #1565c0;
    padding: 14px 18px;
    border-radius: 0 6px 6px 0;
    margin-top: 12px;
    font-size: 14px;
    color: #333;
}

.ctm-info-box strong { color: #1565c0; display: block; margin-bottom: 6px; }
.ctm-info-box p { margin: 4px 0; }

/* ── BOTONES ────────────────────────────────────────────── */
.ctm-form-actions {
    padding: 24px 30px;
    text-align: center;
}

.ctm-btn {
    display: inline-block;
    padding: 14px 36px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all .25s;
}

.ctm-btn-primary {
    background: linear-gradient(135deg, #1565c0, #1a237e);
    color: #fff !important;
    width: 100%;
    max-width: 400px;
}

.ctm-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(21,101,192,.35);
}

/* ── SPINNER ────────────────────────────────────────────── */
.ctm-spinner {
    width: 44px; height: 44px;
    border: 4px solid #e0e6f0;
    border-top: 4px solid #1565c0;
    border-radius: 50%;
    animation: ctmSpin 1s linear infinite;
    margin: 0 auto 12px;
}

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

/* ── TABLA DE PRECIOS ───────────────────────────────────── */
.ctm-pricing-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    padding: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ctm-pricing-card {
    background: #fff;
    border-radius: 12px;
    border: 2px solid #e0e6f0;
    padding: 30px 24px;
    text-align: center;
    transition: all .25s;
    position: relative;
    overflow: hidden;
}

.ctm-pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,.12);
    border-color: var(--plan-color);
}

.ctm-pricing-featured {
    border-color: var(--plan-color);
    box-shadow: 0 4px 20px rgba(0,0,0,.1);
}

.ctm-pricing-badge {
    background: var(--plan-color);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 16px;
    position: absolute;
    top: 0; right: 0;
    border-radius: 0 10px 0 8px;
    letter-spacing: .5px;
}

.ctm-pricing-icon { font-size: 36px; margin-bottom: 10px; }
.ctm-pricing-header h3 { margin: 0 0 4px; font-size: 22px; color: var(--plan-color); }
.ctm-pricing-header p  { margin: 0 0 16px; font-size: 14px; color: #888; }

.ctm-pricing-price { margin: 16px 0; }
.ctm-price-amount { font-size: 40px; font-weight: 800; color: var(--plan-color); }
.ctm-price-period { font-size: 16px; color: #888; }
.ctm-price-anual  { font-size: 13px; color: #aaa; margin-top: 4px; }

.ctm-pricing-features {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: left;
    font-size: 14px;
    color: #555;
}

.ctm-pricing-features li { padding: 5px 0; }
.ctm-pricing-features li::before { content: none; }

.ctm-btn-plan {
    background: var(--plan-color);
    color: #fff !important;
    padding: 11px 28px;
    font-size: 15px;
    border-radius: 6px;
    display: inline-block;
    text-decoration: none;
    font-weight: 700;
    transition: all .2s;
}

.ctm-btn-plan:hover { opacity: .88; transform: translateY(-1px); }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 600px) {
    .ctm-form-row    { grid-template-columns: 1fr; }
    .ctm-plan-grid   { grid-template-columns: 1fr; }
    .ctm-form-section, .ctm-form-title, .ctm-form-actions { padding-left: 18px; padding-right: 18px; }
    .ctm-pricing-table { grid-template-columns: 1fr; }
}
