/* Reset e Configurações Gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Sobrescrever cores primárias do Bootstrap */
:root {
    --bs-primary: #9b0e1c;
    --bs-primary-rgb: 155, 14, 28;
}

.btn-primary {
    --bs-btn-bg: #9b0e1c;
    --bs-btn-border-color: #9b0e1c;
    --bs-btn-hover-bg: #6b0a14;
    --bs-btn-hover-border-color: #6b0a14;
    --bs-btn-active-bg: #6b0a14;
    --bs-btn-active-border-color: #6b0a14;
}

.text-primary {
    color: #9b0e1c !important;
}

.bg-primary {
    background-color: #9b0e1c !important;
}

body {
    font-family: 'Rubik', sans-serif;
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Navbar Customizada */
.navbar {
    background: #9b0e1c !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.4rem;
}

.navbar-logo {
    height: 40px;
    width: auto;
}

/* Card Principal */
.card {
    border-radius: 20px;
    background: #ffffff;
    animation: fadeIn 0.5s ease-out;
}

.card-body {
    padding: 2rem !important;
}

.card-title {
    color: #333;
    font-weight: 600;
    font-size: 1.5rem;
}

/* Valor */
.text-success {
    color: #28a745 !important;
    font-size: 1.3rem !important;
}

/* QR Code Container */
.qrcode-container {
    padding: 10px 0;
}

.qrcode-wrapper {
    position: relative;
    display: inline-block;
    padding: 10px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.qrcode-image {
    max-width: 320px;
    height: auto;
    border-radius: 10px;
}

.qrcode-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 16px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.95rem;
    color: #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Seção PIX Copia e Cola */
.pix-code-section h5 {
    color: #333;
    font-weight: 600;
    font-size: 1rem;
}

.pix-code-box {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    border: 1px solid #dee2e6;
}

.pix-code-text {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    background: #fff;
    border: 1px solid #ced4da;
    resize: none;
    word-break: break-all;
    line-height: 1.4;
}

.pix-code-text:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    border-color: #86b7fe;
}

/* Botão Copiar */
.btn-primary {
    background: linear-gradient(135deg, #9B0E1C 0%, #6B0A14 100%);
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(155, 14, 28, 0.4);
    background: #9b0e1c !important;
}

.btn-primary:active {
    transform: translateY(0);
}

/* Seção de Informações */
.info-section h5 {
    color: #333;
    font-weight: 600;
    font-size: 1rem;
}

.alert-info {
    background-color: #e7f3ff;
    border-color: #b3d9ff;
    border-radius: 10px;
    color: #004085;
}

.alert-info p {
    margin-bottom: 0.5rem;
}

.alert-info a {
    color: #004085;
    font-weight: 500;
}

.alert-info a:hover {
    color: #002752;
    text-decoration: underline !important;
}

.alert-info i {
    font-size: 1.1rem;
}

/* Footer */
.footer {
    background: #9b0e1c !important;
    margin-top: auto;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

/* Toast Notification */
.toast-container {
    z-index: 1050;
}

/* Responsividade */
@media (max-width: 768px) {
    .card-title {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    .qrcode-image {
        max-width: 200px;
    }

    .qrcode-label {
        font-size: 0.9rem;
        padding: 6px 15px;
    }

    .pix-code-text {
        font-size: 0.75rem;
    }

    .btn-primary {
        font-size: 0.9rem;
        padding: 12px;
    }

    .navbar-brand {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .card-body {
        padding: 1.5rem !important;
    }

    .qrcode-wrapper {
        padding: 15px;
    }

    .qrcode-image {
        max-width: 180px;
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estilo de loading para o botão */
.btn-primary.loading {
    position: relative;
    color: transparent;
}

.btn-primary.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
