/**
 * Estilos para Sistema de Pagos - Masterclass
 * Versión 1.0
 */

/* Modal Base */
.cp-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.cp-modal--active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cp-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.cp-modal__content {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    max-width: 550px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: cpModalSlideIn 0.3s ease;
}

@keyframes cpModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cp-modal__close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.2s;
}

.cp-modal__close:hover {
    background: #e0e0e0;
    color: #333;
}

/* Header */
.cp-modal__header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.cp-modal__title {
    font-size: 1.5rem;
    color: #333;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.cp-modal__course-name {
    font-size: 1.1rem;
    color: #ff6b35;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.cp-modal__course-price {
    font-size: 1.8rem;
    color: #1a5f4a;
    margin: 0;
    font-weight: 700;
}

/* Form */
.cp-form__section {
    margin-bottom: 20px;
}

.cp-form__section-title {
    font-size: 1rem;
    color: #333;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.cp-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.cp-form__group {
    display: flex;
    flex-direction: column;
}

.cp-form__group--full {
    grid-column: 1 / -1;
}

.cp-form__group label {
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 5px;
    font-weight: 500;
}

.cp-form__group input {
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.cp-form__group input:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.cp-form__group input::placeholder {
    color: #aaa;
}

/* Email validation states */
.cp-input--success {
    border-color: #4caf50 !important;
}

.cp-input--error {
    border-color: #f44336 !important;
}

.cp-form__email-status {
    font-size: 0.8rem;
    margin-top: 5px;
    min-height: 18px;
}

.cp-form__email-status--success {
    color: #4caf50;
}

.cp-form__email-status--error {
    color: #f44336;
}

/* Checkbox */
.cp-form__checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #555;
}

.cp-form__checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #ff6b35;
}

.cp-form__checkbox a {
    color: #ff6b35;
    text-decoration: none;
}

.cp-form__checkbox a:hover {
    text-decoration: underline;
}

/* Buttons */
.cp-form__actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

.cp-btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.cp-btn--primary {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8f5a 100%);
    color: white;
}

.cp-btn--primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #e55a2b 0%, #ff6b35 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.cp-btn--primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.cp-btn--secondary {
    background: #f5f5f5;
    color: #666;
}

.cp-btn--secondary:hover {
    background: #e8e8e8;
}

/* Messages */
.cp-message {
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
    font-weight: 500;
}

.cp-message--success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.cp-message--error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

/* Responsive */
@media (max-width: 600px) {
    .cp-modal__content {
        padding: 20px;
        margin: 10px;
        max-height: 95vh;
    }

    .cp-form__row {
        grid-template-columns: 1fr;
    }

    .cp-modal__title {
        font-size: 1.3rem;
    }

    .cp-form__actions {
        flex-direction: column;
    }

    .cp-btn {
        width: 100%;
    }
}

/* ============================================
   BOTÓN DE COMPRA EN LA PÁGINA DEL CURSO
   ============================================ */

.course-buy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8f5a 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.course-buy-btn:hover {
    background: linear-gradient(135deg, #e55a2b 0%, #ff6b35 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.course-buy-btn--large {
    padding: 18px 40px;
    font-size: 1.2rem;
}

/* Precio tachado */
.course-price-original {
    text-decoration: line-through;
    color: #999;
    font-size: 1rem;
    margin-right: 10px;
}

.course-price-current {
    font-size: 2rem;
    font-weight: 700;
    color: #1a5f4a;
}

.course-price-label {
    font-size: 0.9rem;
    color: #666;
}
