/**
 * International Checkout Module - Checkout Page Styles
 * Versión: 1.0
 * Fecha: 2025-01-19
 */

.international-checkout-page {
    padding: 2rem;
}

.international-checkout-page h1 {
    color: #1E3A8A;
    margin-bottom: 2rem;
    text-align: center;
}

.error-message {
    background: #f8d7da;
    border: 2px solid #dc3545;
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
}

.error-message h3 {
    color: #721c24;
    margin-top: 0;
}

.error-message ul {
    text-align: left;
    display: inline-block;
    margin: 1rem 0;
}

.error-message a {
    color: #1E3A8A;
    text-decoration: underline;
}

.error-message .btn-primary {
    color: white !important;
    text-decoration: none !important;
}

.checkout-form {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 15px 30px rgba(15, 23, 42, 0.08);
    padding: 2rem;
    max-width: 820px;
    margin: 0 auto 3rem auto;
}

.checkout-container {
    display: block;
}

.checkout-summary-section {
    background: linear-gradient(180deg, #F1F5FF 0%, #FFFFFF 100%);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: inset 0 0 0 1px rgba(30, 58, 138, 0.08);
    margin: 0 auto 2.5rem auto;
    max-width: 820px;
    position: static;
}

.checkout-summary-section h2,
.checkout-form-section h2 {
    color: #1E3A8A;
    margin-bottom: 1rem;
}

.checkout-form-section h2 {
    border-bottom: 1px solid #E2E8F0;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.order-summary {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.summary-products {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.summary-item {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border-radius: 12px;
    background: #FFFFFF;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.summary-item-image {
    width: 100px;
    height: 100px;
    flex: 0 0 100px;
    border-radius: 12px;
    background: #F1F5FF;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.summary-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.summary-item-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.summary-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.summary-item-info strong {
    color: #1E3A8A;
}

.summary-item-price {
    font-weight: 700;
    color: #0F172A;
}

.summary-totals {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(30, 58, 138, 0.12);
}

.total-row {
    display: flex;
    justify-content: space-between;
    color: #334155;
}

.total-row strong {
    color: #0F172A;
}

.total-row.total-final {
    font-size: 1.1rem;
    font-weight: 700;
}

.checkout-summary-section,
.checkout-form-section {
    width: 100%;
}

.checkout-form-section {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 15px 30px rgba(15, 23, 42, 0.08);
    padding: 2rem;
    max-width: 820px;
    margin: 0 auto;
}

.form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #334155;
}

.form-group input,
.form-group textarea {
    border: 1px solid #CBD5F5;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1E3A8A;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: #dc3545;
}

.payment-methods {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border: 1px solid #CBD5F5;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #F8FAFF;
}

.radio-label input {
    accent-color: #1E3A8A;
}

.radio-label:hover {
    border-color: #1E3A8A;
    box-shadow: 0 10px 20px rgba(30, 58, 138, 0.08);
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-submit-order {
    width: 100%;
}

.checkout-summary-section .btn-outline,
.form-actions .btn-outline {
    width: 100%;
    text-align: center;
}

.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: #1E3A8A;
    color: white !important;
    text-decoration: none;
}

.btn-primary:hover:not(:disabled) {
    background: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 58, 138, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-outline {
    background: transparent;
    color: #1E3A8A;
    border: 2px solid #1E3A8A;
}

.btn-outline:hover {
    background: #1E3A8A;
    color: white;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .international-checkout-page {
        padding: 1rem;
    }

    .international-checkout-page h1 {
        font-size: 1.5rem;
    }

    .checkout-summary-section {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
    }

    .checkout-summary-section h2 {
        font-size: 1.25rem;
    }

    .summary-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .summary-item-image {
        width: 100%;
        height: 200px;
    }

    .summary-item-content {
        flex-direction: column;
        width: 100%;
    }

    .summary-item-price {
        align-self: flex-end;
    }

    .checkout-form,
    .checkout-form-section {
        padding: 1.25rem;
    }

    .checkout-form-section h2 {
        font-size: 1.25rem;
    }

    .form-row {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 640px) {
    .international-checkout-page {
        padding: 0.75rem;
    }

    .international-checkout-page h1 {
        font-size: 1.25rem;
    }

    .checkout-summary-section {
        padding: 1rem;
    }

    .summary-item {
        padding: 0.75rem;
    }

    .summary-item-image {
        height: 150px;
    }

    .checkout-form,
    .checkout-form-section {
        padding: 1rem;
    }

    .form-group input,
    .form-group textarea {
        font-size: 16px; /* Evita zoom en iOS */
    }

    .radio-label {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

/* Loading Animation Styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: column;
}

.loading-content {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.loading-content img {
    max-width: 200px;
    height: auto;
    margin-bottom: 1rem;
}

.loading-content p {
    color: #1E3A8A;
    font-size: 1.1rem;
    font-weight: bold;
    margin: 0;
}

