/* ============================================================
   PÁGINAS DE PAGAMENTO - CSS COMPLETO E RESPONSIVO
   Usado em: PIX, Cartão de Crédito, Débito e Boleto
   ============================================================ */

.payment-page {
    background: #f5f5f5;
    min-height: 100vh;
    padding: 2rem 0;
}

.payment-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 1rem 0;
    font-size: 0.9rem;
    color: var(--text-light);
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb .separator {
    color: var(--border-color);
}

.breadcrumb .current {
    color: var(--text-dark);
    font-weight: 500;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.payment-content {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    align-items: start;
    margin-top: 2rem;
}

/* ============================================================
   STATUS DO PAGAMENTO
   ============================================================ */
.payment-status {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.status-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.status-icon.pending {
    background: #fef3c7;
    color: #92400e;
}

.status-icon.success {
    background: #d1fae5;
    color: #065f46;
}

.status-icon.expired {
    background: #fee2e2;
    color: #991b1b;
}

.payment-status h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.payment-status p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* ============================================================
   CARDS
   ============================================================ */
.payment-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-subtitle {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.title-icon {
    font-size: 1.8rem;
}

/* ============================================================
   INSTRUÇÕES DE PAGAMENTO
   ============================================================ */
.payment-instructions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.instruction-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.step-number {
    width: 36px;
    height: 36px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step-text {
    flex: 1;
    padding-top: 6px;
    color: var(--text-dark);
    line-height: 1.6;
}

/* ============================================================
   QR CODE PIX
   ============================================================ */
.qrcode-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.qrcode-container {
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    border: 3px solid var(--border-color);
}

.qrcode-image {
    display: block;
    width: 300px;
    height: 300px;
}

.qrcode-info {
    width: 100%;
}

.timer-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #fef3c7;
    border-radius: 8px;
}

.timer-icon {
    font-size: 2rem;
}

.timer-content {
    flex: 1;
}

.timer-label {
    font-size: 0.9rem;
    color: #92400e;
}

.timer-value {
    font-size: 2rem;
    font-weight: 700;
    color: #92400e;
}

/* ============================================================
   CÓDIGO PIX / BOLETO
   ============================================================ */
.pix-code-container,
.barcode-container {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.pix-code-input,
.barcode-input {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.95rem;
    background: var(--bg-light);
}

.btn-copy-code {
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-copy-code:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.copy-icon {
    font-size: 1.1rem;
}

.copy-success {
    padding: 0.75rem;
    background: #d1fae5;
    color: #065f46;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
}

/* ============================================================
   DESTAQUE DE DESCONTO
   ============================================================ */
.discount-highlight {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: 12px;
    margin-top: 1.5rem;
}

.discount-icon {
    font-size: 3rem;
}

.discount-content {
    flex: 1;
}

.discount-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.discount-subtitle {
    font-size: 1rem;
}

.old-value {
    text-decoration: line-through;
    opacity: 0.8;
}

.new-value {
    font-weight: 700;
    font-size: 1.2rem;
}

/* ============================================================
   FORMULÁRIO DE CARTÃO
   ============================================================ */
.credit-card-preview {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 2rem;
    color: white;
    margin-bottom: 2rem;
    position: relative;
    min-height: 200px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.card-chip {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.card-number {
    font-size: 1.5rem;
    font-family: monospace;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
}

.card-holder {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-expiry {
    font-family: monospace;
    font-size: 1rem;
}

.card-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.form-input {
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus {
    border-color: var(--primary-color);
}

.input-with-tooltip {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-tooltip .form-input {
    flex: 1;
}

.tooltip {
    position: relative;
    margin-left: 0.5rem;
    cursor: help;
    font-size: 1.2rem;
}

.tooltip-text {
    visibility: hidden;
    position: absolute;
    bottom: 125%;
    right: 0;
    background: var(--text-dark);
    color: white;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
    width: 200px;
    z-index: 1;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
}

/* ============================================================
   SEGURANÇA
   ============================================================ */
.security-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: #f0fdf4;
    border: 2px solid #bbf7d0;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.security-icon {
    font-size: 2.5rem;
}

.security-text strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.security-text p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

/* ============================================================
   BOTÃO DE PAGAMENTO
   ============================================================ */
.btn-pay {
    width: 100%;
    background: var(--success-color);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-pay:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* ============================================================
   DADOS DO BOLETO
   ============================================================ */
.boleto-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.boleto-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.boleto-row:last-child {
    border-bottom: none;
}

.boleto-label {
    color: var(--text-light);
}

.boleto-value {
    color: var(--text-dark);
    font-weight: 500;
}

.boleto-value.strong {
    font-weight: 700;
    font-size: 1.1rem;
}

/* Ações do Boleto */
.boleto-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-download-boleto,
.btn-print-boleto {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 14px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-download-boleto {
    background: var(--primary-color);
    color: white;
    border: none;
}

.btn-download-boleto:hover {
    background: var(--primary-dark);
}

.btn-print-boleto {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-print-boleto:hover {
    background: var(--primary-color);
    color: white;
}

.btn-icon {
    font-size: 1.2rem;
}

/* ============================================================
   AVISOS
   ============================================================ */
.warning-box {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: #fef3c7;
    border: 2px solid #fbbf24;
    border-radius: 12px;
    margin-top: 1.5rem;
}

.warning-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.warning-content strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #92400e;
}

.warning-content p {
    color: #92400e;
    margin: 0;
    line-height: 1.6;
}

/* ============================================================
   SIDEBAR - RESUMO
   ============================================================ */
.payment-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.summary-card,
.info-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.summary-title,
.info-title {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    font-size: 1rem;
    color: var(--text-dark);
}

.summary-row.discount {
    color: var(--success-color);
}

.summary-row.total {
    border-top: 2px solid var(--border-color);
    margin-top: 0.5rem;
    padding-top: 1rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.summary-row.total span:last-child {
    color: var(--primary-color);
}

.summary-info {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    text-align: center;
}

.info-content {
    color: var(--text-light);
    line-height: 1.8;
}

/* Bandeiras de Cartão */
.card-brands {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.brand-badge {
    padding: 6px 12px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Botões de Navegação */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-back,
.btn-orders {
    display: block;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-back {
    background: white;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.btn-back:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-orders {
    background: var(--primary-color);
    color: white;
}

.btn-orders:hover {
    background: var(--primary-dark);
}

/* ============================================================
   RESPONSIVIDADE
   ============================================================ */

@media (max-width: 1024px) {
    .payment-content {
        grid-template-columns: 1fr;
    }

    .payment-sidebar {
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    .payment-page {
        padding: 1rem 0;
    }

    .payment-status h1 {
        font-size: 1.5rem;
    }

    .status-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .payment-card {
        padding: 1.5rem;
    }

    .card-title {
        font-size: 1.2rem;
    }

    .qrcode-image {
        width: 250px;
        height: 250px;
    }

    .timer-value {
        font-size: 1.5rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .boleto-actions {
        grid-template-columns: 1fr;
    }

    .discount-highlight {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .payment-card {
        padding: 1rem;
    }

    .credit-card-preview {
        padding: 1.5rem;
    }

    .card-number {
        font-size: 1.2rem;
    }

    .pix-code-container,
    .barcode-container {
        flex-direction: column;
    }

    .btn-copy-code {
        width: 100%;
        justify-content: center;
    }
}