 :root {
    --primary-color: #009EE3;
    --secondary-color: #0082BA;
    --success-color: #00b67a;
    --danger-color: #e74c3c;
    --light-gray: #f8f9fa;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f5f7fa;
    color: #333;
}

.container {
    max-width: 1100px;
    margin-top: 30px;
    margin-bottom: 50px;
}

.card {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    padding: 1.25rem;
}

.section-title {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0;
}

.nav-pills .nav-link {
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 500;
    color: #4a5568;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.nav-pills .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.nav-pills .nav-link:not(.active):hover {
    background-color: #edf2f7;
}

.nav-pills .nav-icon {
    margin-right: 8px;
}

.form-label {
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    padding: 12px;
    border-radius: var(--border-radius);
    border: 1px solid #e2e8f0;
    box-shadow: none;
    transition: border-color 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 158, 227, 0.1);
}

.input-group-text {
    background-color: #f8fafc;
    border-color: #e2e8f0;
    color: #718096;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 158, 227, 0.2);
}

.order-summary {
    background-color: #f8fafc;
    border-radius: var(--border-radius);
    padding: 24px;
}

.order-summary-title {
    font-weight: 600;
    margin-bottom: 16px;
    color: #2d3748;
}

.order-summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.order-summary-total {
    font-weight: 700;
    color: #2d3748;
    border-top: 1px solid #e2e8f0;
    margin-top: 16px;
    padding-top: 16px;
}

/* Estilos para alertas de resposta */
.payment-response {
    min-height: 24px;
    margin: 10px 0;
    padding: 10px;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.alert {
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.alert-info {
    background-color: #e8f4fd;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Animações */
@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.processing {
    animation: pulse 1.5s infinite;
}

/* Preloader global */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

/* Preloader específico para cartão */
.card-preloader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10;
    backdrop-filter: blur(3px);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 158, 227, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 1.75rem auto;
    max-width: 600px;
}

.modal-content {
    background-color: #fff;
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1.5rem;
    min-height: 300px;
}

.modal-footer {
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.btn-close {
    background: none;
    border: 0;
    font-size: 1.5rem;
    line-height: 1;
    color: #000;
    opacity: 0.5;
    cursor: pointer;
}

.btn-close:hover {
    opacity: 0.75;
}

/* Preloader centralizado nos modais */
.modal-preloader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border-radius: var(--border-radius);
    flex-direction: column;
}

.modal-preloader .preloader-text {
    margin-top: 1rem;
    color: #4a5568;
    font-weight: 500;
}

/* Estilo para campos do Mercado Pago */
.card-field {
    height: 48px;
    padding: 12px;
}

/* Posicionamento relativo para os cards com preloader */
.card-body {
    position: relative;
}

/* Responsividade */
@media (max-width: 767.98px) {
    .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }

    .modal-body {
        padding: 1rem;
        min-height: 250px;
    }

    .nav-pills .nav-link {
        padding: 10px 16px;
        margin-right: 5px;
        font-size: 0.9rem;
    }
}