/* Checkout Page Specific Styles */

/* Hero Section for Checkout */
.hero-section-checkout {
    background: linear-gradient(135deg, var(--light-bg) 0%, #E9ECEF 100%);
    padding: 120px 0 60px;
    position: relative;
    overflow: hidden;
}

.hero-section-checkout::before {
    content: '';
    position: absolute;
    top: 0;
    right: -50%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 0%, rgba(40, 167, 69, 0.1) 50%, transparent 100%);
    transform: rotate(-15deg);
    z-index: 1;
}

.checkout-hero-content {
    position: relative;
    z-index: 2;
}

.checkout-icon {
    width: 100px;
    height: 100px;
    background: var(--gradient-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 3rem;
    color: white;
    box-shadow: var(--shadow-medium);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.hero-section-checkout .hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-section-checkout .hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-weight: 400;
}

/* Security Badges */
.security-badges {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    box-shadow: var(--shadow-light);
    border: 1px solid #E9ECEF;
    transition: all 0.3s ease;
}

.security-badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.security-badge i {
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.security-badge span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
}

/* Checkout Container */
.checkout-container {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-medium);
    padding: 3rem;
    border: 1px solid #E9ECEF;
    position: relative;
    overflow: hidden;
}

.checkout-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-secondary);
}

/* Progress Steps */
.checkout-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #E9ECEF;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

.step.active .step-number {
    background: var(--gradient-secondary);
    color: white;
    transform: scale(1.1);
}

.step-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    text-align: center;
}

.step.active .step-label {
    color: var(--secondary-color);
    font-weight: 600;
}

.step-line {
    width: 100px;
    height: 2px;
    background: #E9ECEF;
    margin: 0 1rem;
    margin-bottom: 2rem;
}

/* Form Sections */
.form-section {
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: var(--light-bg);
    border-radius: 15px;
    border: 1px solid #E9ECEF;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.section-title i {
    color: var(--secondary-color);
}

/* Form Inputs */
.checkout-input {
    border-radius: 12px;
    border: 2px solid #E9ECEF;
    padding: 1rem 1rem 1rem 2.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    height: 60px;
}

.checkout-input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.12rem rgba(40, 167, 69, 0.25);
    background: white;
}

.form-floating > label {
    color: var(--text-muted);
    font-weight: 500;
    padding-left: 0.8rem;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--secondary-color);
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

.form-help {
    margin-top: 0.5rem;
}

.form-help small {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Value Preview */
.value-preview {
    background: white;
    border: 2px solid var(--secondary-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.3s ease;
}

.value-preview:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.value-preview-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.value-preview-amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1;
}

/* Order Summary */
.order-summary {
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.summary-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.summary-title i {
    color: var(--secondary-color);
}

.summary-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.summary-label {
    font-weight: 500;
    color: var(--text-dark);
    display: flex;
    align-items: center;
}

.summary-label i {
    color: var(--text-muted);
    width: 20px;
}

.summary-value {
    font-weight: 600;
    color: var(--text-dark);
}

.summary-divider {
    height: 1px;
    background: #E9ECEF;
    margin: 0.5rem 0;
}

.summary-total {
    background: var(--light-bg);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 0.5rem;
}

.summary-total .summary-label,
.summary-total .summary-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Payment Section */
.payment-section {
    text-align: center;
    margin-top: 2rem;
}

.btn-payment {
    background: var(--gradient-secondary);
    border: none;
    color: white;
    font-weight: 600;
    padding: 1.25rem 3rem;
    border-radius: 50px;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
    min-width: 250px;
}

.btn-payment:hover {
    background: linear-gradient(135deg, #20C997 0%, #28A745 100%);
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
    color: white;
}

.btn-payment:active {
    transform: translateY(-1px);
}

.btn-payment:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-payment .loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 0.5rem;
}

.payment-info {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #E9ECEF;
}

/* Loading Modal */
.loading-modal {
    border-radius: 20px;
    border: none;
    box-shadow: var(--shadow-heavy);
}

.loading-animation {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    border: 4px solid #E9ECEF;
    border-top: 4px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.loading-description {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.loading-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
    max-width: 300px;
    margin: 0 auto;
}

.loading-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.loading-step.active {
    background: rgba(40, 167, 69, 0.1);
    color: var(--secondary-color);
}

.loading-step i {
    width: 20px;
    text-align: center;
}

.loading-step.completed i {
    color: var(--secondary-color);
}

/* Error Modal */
.error-modal {
    border-radius: 20px;
    border: none;
    box-shadow: var(--shadow-heavy);
}

.error-header {
    background: linear-gradient(135deg, #DC3545, #C82333);
    color: white;
    border-radius: 20px 20px 0 0;
    border-bottom: none;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.error-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
}

.error-details {
    background: var(--light-bg);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

/* Active Navigation Link */
.nav-link.active {
    color: var(--secondary-color) !important;
    font-weight: 600;
}

.nav-link.active::after {
    width: 100%;
    left: 0;
}

/* Responsive Design */
@media (max-width: 992px) {
    .checkout-container {
        padding: 2rem;
    }
    
    .hero-section-checkout .hero-title {
        font-size: 2rem;
    }
    
    .security-badges {
        gap: 1rem;
    }
    
    .checkout-steps {
        flex-direction: column;
        gap: 1rem;
    }
    
    .step-line {
        width: 2px;
        height: 50px;
        margin: 0.5rem 0;
    }
}

@media (max-width: 768px) {
    .hero-section-checkout {
        padding: 100px 0 40px;
    }
    
    .hero-section-checkout .hero-title {
        font-size: 1.8rem;
    }
    
    .checkout-container {
        padding: 1.5rem;
    }
    
    .form-section {
        padding: 1.5rem;
    }
    
    .order-summary {
        padding: 1.5rem;
    }
    
    .security-badges {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .checkout-icon {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
    
    .btn-payment {
        padding: 1rem 2rem;
        font-size: 1.1rem;
        min-width: 200px;
    }
    
    .value-preview-amount {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-section-checkout .hero-title {
        font-size: 1.5rem;
    }
    
    .checkout-input {
        padding: 0.75rem 0.75rem 0.75rem 2.5rem;
        height: 55px;
    }
    
    .form-floating > label {
        padding-left: 2.5rem;
    }
    
    .summary-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .loading-steps {
        max-width: 250px;
    }
    
    .checkout-steps {
        margin-bottom: 2rem;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .step-label {
        font-size: 0.8rem;
    }
}

/* Animation for form elements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.checkout-container {
    animation: fadeInUp 0.6s ease forwards;
}

.form-section {
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.order-summary {
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

.payment-section {
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

/* Spin animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Input focus effects */
.checkout-input:focus {
    animation: inputFocus 0.3s ease;
}

@keyframes inputFocus {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Button click effect */
.btn-payment:active {
    animation: buttonClick 0.1s ease;
}

@keyframes buttonClick {
    0% { transform: scale(1) translateY(-3px); }
    50% { transform: scale(0.98) translateY(-1px); }
    100% { transform: scale(1) translateY(-3px); }
}

/* Success state for completed steps */
.loading-step.completed {
    background: rgba(40, 167, 69, 0.1);
    color: var(--secondary-color);
}

.loading-step.completed i {
    color: var(--secondary-color);
    animation: checkmark 0.5s ease;
}

@keyframes checkmark {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}
/* Estilos para campos readonly */
.checkout-input[readonly] {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    border-color: #dee2e6;
}

.checkout-input[readonly]:focus {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    box-shadow: none;
}

/* Estado de loading para inputs */
.checkout-input.loading {
    background: linear-gradient(90deg, #f8f9fa 25%, #e9ecef 50%, #f8f9fa 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
    color: #6c757d;
}

@keyframes loading-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Melhorias visuais para campos readonly */
.form-floating > .checkout-input[readonly] ~ label {
    color: #6c757d;
}

.form-floating > .checkout-input[readonly]:focus ~ label,
.form-floating > .checkout-input[readonly]:not(:placeholder-shown) ~ label {
    color: #6c757d;
}

/* Indicador visual para campo editável */
.checkout-input:not([readonly]) {
    border-left: 4px solid var(--secondary-color);
}

.checkout-input:not([readonly]):focus {
    border-left: 4px solid var(--secondary-color);
}

/* Animação suave para transições */
.checkout-input {
    transition: all 0.3s ease, background 0.3s ease;
}