/**
 * Twingital Featured Payments - Frontend Styles
 * Path: assets/css/payments.css
 */

/* ==========================================
   PAYMENT WRAPPER
   ========================================== */
.tdf-payment-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.tdf-payment-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    align-items: start;
}

/* ==========================================
   HEADER
   ========================================== */
.tdf-payment-header {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}

.tdf-payment-header h1 {
    margin: 0 0 15px;
    font-size: 36px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tdf-company-name {
    font-size: 20px;
    opacity: 0.95;
    margin: 0;
    font-weight: 500;
}

.tdf-company-name strong {
    font-weight: 700;
    text-decoration: underline;
}

/* ==========================================
   PAYMENT STEPS
   ========================================== */
.tdf-payment-step {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tdf-payment-step h2 {
    margin: 0 0 25px;
    font-size: 24px;
    color: #1f2937;
    padding-bottom: 15px;
    border-bottom: 3px solid #f3f4f6;
}

/* ==========================================
   PLANS GRID
   ========================================== */
.tdf-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.tdf-plan-card {
    position: relative;
    background: white;
    border: 3px solid #e5e7eb;
    border-radius: 16px;
    padding: 28px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.tdf-plan-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.tdf-plan-card:hover {
    border-color: #667eea;
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.25);
}

.tdf-plan-card:hover::before {
    transform: scaleX(1);
}

.tdf-plan-card.popular {
    border-color: #f59e0b;
    background: linear-gradient(to bottom, #fffbeb 0%, white 40%);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.2);
}

.tdf-plan-card.popular::before {
    background: linear-gradient(90deg, #f59e0b, #fb923c);
}

.tdf-plan-badge {
    position: absolute;
    top: -14px;
    right: 24px;
    background: linear-gradient(135deg, #f59e0b, #fb923c);
    color: white;
    padding: 6px 16px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    letter-spacing: 0.5px;
}

.tdf-plan-card h3 {
    font-size: 20px;
    margin: 0 0 20px;
    color: #1f2937;
    font-weight: 700;
}

.tdf-plan-price {
    text-align: center;
    margin: 24px 0;
    padding: 20px 0;
    background: #f9fafb;
    border-radius: 12px;
}

.tdf-plan-price .currency {
    font-size: 28px;
    vertical-align: top;
    color: #6b7280;
    font-weight: 600;
}

.tdf-plan-price .amount {
    font-size: 56px;
    font-weight: 800;
    color: #667eea;
    line-height: 1;
    letter-spacing: -2px;
}

.tdf-plan-price .period {
    display: block;
    color: #6b7280;
    font-size: 15px;
    margin-top: 8px;
    font-weight: 500;
}

.tdf-plan-discount {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    text-align: center;
    padding: 8px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.tdf-plan-features {
    list-style: none;
    padding: 0;
    margin: 24px 0;
}

.tdf-plan-features li {
    padding: 10px 0;
    color: #4b5563;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tdf-plan-features li::before {
    content: '✓';
    color: #10b981;
    font-weight: bold;
    font-size: 18px;
}

.tdf-select-plan-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.tdf-select-plan-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.tdf-select-plan-btn:active {
    transform: translateY(0);
}

/* ==========================================
   PAYMENT METHODS
   ========================================== */
.tdf-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.tdf-method-card {
    background: white;
    border: 3px solid #e5e7eb;
    border-radius: 16px;
    padding: 28px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.tdf-method-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.tdf-method-card:hover:not(.disabled) {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.2);
}

.tdf-method-card:hover:not(.disabled)::before {
    transform: scaleX(1);
}

.tdf-method-card.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f9fafb;
}

.tdf-method-icon {
    font-size: 56px;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.tdf-method-card h4 {
    margin: 0 0 12px;
    font-size: 18px;
    color: #1f2937;
    font-weight: 700;
}

.tdf-method-card p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
}

.tdf-instant-badge,
.tdf-disabled-badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-top: 12px;
}

.tdf-instant-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.tdf-disabled-badge {
    background: #ef4444;
    color: white;
}

/* ==========================================
   PAYMENT FORMS
   ========================================== */
.tdf-payment-form {
    max-width: 600px;
    margin: 0 auto;
}

.tdf-bank-info,
.tdf-contact-info {
    background: linear-gradient(135deg, #f9fafb, #ffffff);
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 28px;
}

.tdf-bank-info h3,
.tdf-contact-info h3 {
    margin: 0 0 20px;
    color: #1f2937;
    font-size: 20px;
    font-weight: 700;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

.tdf-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f3f4f6;
}

.tdf-info-row:last-child {
    border: none;
}

.tdf-info-row strong {
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tdf-info-row span {
    color: #1f2937;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.tdf-copy-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 10px;
}

.tdf-copy-btn:hover {
    background: #5568d3;
    transform: scale(1.05);
}

.tdf-form {
    background: white;
    padding: 28px;
    border-radius: 16px;
    border: 2px solid #e5e7eb;
}

.tdf-form-group {
    margin-bottom: 24px;
}

.tdf-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 600;
    font-size: 14px;
}

.tdf-form-group input[type="text"],
.tdf-form-group input[type="file"],
.tdf-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
}

.tdf-form-group input:focus,
.tdf-form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.tdf-form-group small {
    display: block;
    margin-top: 6px;
    color: #6b7280;
    font-size: 13px;
}

.tdf-submit-btn,
.tdf-confirm-contact-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3);
}

.tdf-submit-btn:hover,
.tdf-confirm-contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(102, 126, 234, 0.4);
}

.tdf-contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    margin: 12px 0;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    color: #1f2937;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
}

.tdf-contact-btn .icon {
    font-size: 24px;
}

.tdf-contact-btn.whatsapp:hover {
    background: #25d366;
    border-color: #25d366;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
}

.tdf-contact-btn.phone:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
    transform: translateY(-2px);
}

.tdf-contact-btn.email:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
    transform: translateY(-2px);
}

/* ==========================================
   SUMMARY SIDEBAR
   ========================================== */
.tdf-payment-summary {
    background: white;
    border: 3px solid #e5e7eb;
    border-radius: 16px;
    padding: 28px;
    height: fit-content;
    position: sticky;
    top: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.tdf-payment-summary h3 {
    margin: 0 0 24px;
    font-size: 20px;
    color: #1f2937;
    font-weight: 700;
    padding-bottom: 16px;
    border-bottom: 2px solid #f3f4f6;
}

.tdf-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 16px 0;
    color: #6b7280;
    font-size: 14px;
}

.tdf-summary-item strong {
    color: #1f2937;
    font-weight: 600;
    font-size: 15px;
}

.tdf-summary-divider {
    border-top: 2px solid #e5e7eb;
    margin: 24px 0;
}

.tdf-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 28px;
    font-weight: 800;
    color: #667eea;
    padding: 16px 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 10px;
    padding: 16px;
}

.tdf-back-btn {
    width: 100%;
    padding: 12px 24px;
    background: #f3f4f6;
    color: #6b7280;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 16px;
}

.tdf-back-btn:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
    color: #374151;
}

/* ==========================================
   UTILITIES
   ========================================== */
.hidden {
    display: none !important;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .tdf-payment-container {
        grid-template-columns: 1fr;
    }
    
    .tdf-payment-summary {
        position: static;
        order: -1;
    }
    
    .tdf-payment-header h1 {
        font-size: 28px;
    }
    
    .tdf-plans-grid {
        grid-template-columns: 1fr;
    }
    
    .tdf-methods-grid {
        grid-template-columns: 1fr;
    }
    
    .tdf-plan-price .amount {
        font-size: 42px;
    }
}

/* ==========================================
   LOADING STATES
   ========================================== */
.tdf-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.tdf-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid #667eea;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================
   MERCADO PAGO BUTTON
   ========================================== */
#mercadopago-button {
    margin: 20px auto;
    text-align: center;
}

#mercadopago-button .mercadopago-button {
    background: #009ee3;
    color: white;
    padding: 16px 32px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

#mercadopago-button .mercadopago-button:hover {
    background: #0086c9;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 158, 227, 0.3);
}