/* ==========================================
   Variables CSS
   ========================================== */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --border-radius: 0.5rem;
}

/* ==========================================
   General Styles
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--dark-color);
}

/* ==========================================
   Navbar Styles
   ========================================== */
.navbar {
    box-shadow: var(--shadow);
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.5rem;
}

/* ==========================================
   Payment Card
   ========================================== */
.payment-card {
    border: none;
    border-radius: var(--border-radius);
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

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

.card-header {
    border: none;
}

/* ==========================================
   Form Styles
   ========================================== */
.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.form-control,
.input-group-text {
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
    padding: 0.75rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* ==========================================
   Payment Methods
   ========================================== */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-payment-method {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-payment-method:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0.25rem 0.5rem rgba(13, 110, 253, 0.2);
    transform: translateY(-2px);
}

.btn-payment-method.active {
    border-color: var(--primary-color);
    background: rgba(13, 110, 253, 0.05);
}

.payment-logo {
    max-width: 100%;
    height: auto;
    max-height: 40px;
}

/* ==========================================
   Payment Summary
   ========================================== */
.payment-summary {
    background: var(--light-color);
    padding: 1.25rem;
    border-radius: var(--border-radius);
}

.payment-summary hr {
    margin: 0.75rem 0;
    opacity: 0.3;
}

.total-amount {
    font-size: 1.25rem;
    color: var(--primary-color);
}

/* ==========================================
   Payment Type Toggle
   ========================================== */
.btn-group .btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    transition: all 0.3s ease;
}

.btn-group .btn-outline-primary:hover {
    background: rgba(13, 110, 253, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-check:checked + .btn-outline-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: var(--primary-color);
    color: white;
}

/* ==========================================
   Buttons
   ========================================== */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 0.875rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(118, 75, 162, 0.4);
    background: linear-gradient(135deg, #5568d3 0%, #653a8b 100%);
}

.btn-primary:active {
    transform: translateY(0);
}

#btnPay {
    position: relative;
    overflow: hidden;
}

#btnPay::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

#btnPay:active::before {
    width: 300px;
    height: 300px;
}

/* ==========================================
   Info Cards
   ========================================== */
.info-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.info-card h6 {
    margin: 0.5rem 0 0.25rem;
    font-weight: 600;
}

.info-card small {
    color: var(--secondary-color);
}

/* ==========================================
   Loading Spinner
   ========================================== */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner.show {
    display: flex;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* ==========================================
   Footer
   ========================================== */
footer {
    margin-top: auto;
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .card-body {
        padding: 1.5rem !important;
    }
    
    .card-header h3 {
        font-size: 1.5rem;
    }
    
    .btn-payment-method {
        padding: 0.75rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .payment-summary {
        font-size: 0.9rem;
    }
    
    .total-amount {
        font-size: 1.1rem;
    }
}

/* ==========================================
   Animations
   ========================================== */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Custom SweetAlert2 styling */
.swal2-popup {
    border-radius: var(--border-radius);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.swal2-title {
    color: var(--primary-color);
}

.swal2-confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-radius: 0.375rem;
    padding: 0.625rem 2rem;
    font-weight: 600;
}

.swal2-cancel {
    border-radius: 0.375rem;
    padding: 0.625rem 2rem;
}

/* Diseño del producto destacado 'Automatización de Gestión de Facturas' */
.featured-product {
    position: relative;
    padding: 30px;
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-product:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.featured-product .badge-popular {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.85rem;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.featured-product .badge-popular {
    position: absolute;
    top: 10px; /* Adjusted to fully display the badge */
    right: 10px;
    background-color: #ffcc00;
    color: #000;
    padding: 5px 10px;
    border-radius: var(--border-radius);
    font-weight: bold;
}
