/* ---------------------------------- */
/* Estilos da Página de Pedido Mágica */
/* ---------------------------------- */

:root {
    --magic-gold: #fbbf24;
    --magic-green: #10b981;
    --magic-bg-dark: #0f172a;
}

/* --- Borda Mágica Giratória (Estrutura 60%) --- */
.magic-checkout-container {
    position: relative;
    border-radius: 1rem;
}

.magic-checkout-container::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 1.2rem; 
    background: linear-gradient(
        90deg, 
        var(--magic-green), 
        var(--magic-gold), 
        #3b82f6, 
        var(--magic-green)
    );
    background-size: 300% 100%;
    animation: shimmer-border-rotate 4s linear infinite;
    z-index: 0;
    opacity: 0.8;
    filter: blur(2px);
}

.magic-checkout-container::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 1.2rem;
    background: linear-gradient(
        90deg, 
        var(--magic-green), 
        transparent, 
        var(--magic-gold), 
        transparent
    );
    background-size: 200% 100%;
    animation: shimmer-border-rotate 8s linear infinite reverse;
    z-index: 0;
    opacity: 0.4;
    filter: blur(10px);
}

@keyframes shimmer-border-rotate {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- Botão Mágico de Confirmação --- */
.btn-confirm-magic {
    position: relative;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    overflow: hidden;
    background: transparent;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px -5px rgba(16, 185, 129, 0.4);
}

.btn-confirm-magic-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    z-index: 1;
    transition: all 0.3s ease;
}

/* Brilho Shimmer no botão */
.btn-confirm-magic::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transform: skewX(-20deg);
    z-index: 2;
    transition: left 0.5s;
}

/* --- HOVER: EFEITO "LUZ ESCURA" --- */
.btn-confirm-magic:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px -5px rgba(16, 185, 129, 0.6);
}
.btn-confirm-magic:hover .btn-confirm-magic-bg {
    background: linear-gradient(135deg, #34d399 0%, #059669 100%);
}
.btn-confirm-magic:hover::after {
    left: 200%;
    transition: left 1s ease-in-out;
}

/* O Efeito de Texto Escuro com Brilho Traseiro */
.btn-confirm-magic:hover .btn-confirm-magic-text {
    color: #022c22; /* Verde muito escuro/Preto */
    text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.5), 0px 0px 15px rgba(255, 255, 255, 0.6);
    font-weight: 900; /* Mais grosso */
    letter-spacing: 0.1em; /* Espalha um pouco */
}
.btn-confirm-magic:hover .btn-confirm-magic-icon {
    color: #022c22;
    filter: drop-shadow(0px 0px 5px rgba(255, 255, 255, 0.6));
    transform: scale(1.2) rotate(-10deg);
}

.btn-confirm-magic:active {
    transform: scale(0.98);
}

/* Estado Desabilitado */
.btn-confirm-magic:disabled {
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}
.btn-confirm-magic:disabled .btn-confirm-magic-bg {
    background: #334155;
}
.btn-confirm-magic:disabled .btn-confirm-magic-text {
    color: #94a3b8;
    text-shadow: none;
}
.btn-confirm-magic:disabled::after {
    display: none;
}

/* --- Efeito de Digitação Terminal Mágico (Reformulado) --- */
.typing-terminal-box {
    position: relative;
    background: rgba(2, 6, 23, 0.7); /* Fundo bem escuro */
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-left: 4px solid var(--magic-green); /* Lateral verde forte */
    border-radius: 0.5rem;
    padding: 1.25rem;
    min-height: 4rem;
    width: 100%;
    font-family: 'Fira Code', 'Consolas', 'Monaco', monospace; /* Fonte Profissional */
    font-size: 1.05rem; /* Tamanho legível (aprox 17px) */
    line-height: 1.6;
    color: #4ade80; /* Texto verde brilhante */
    text-shadow: 0 0 8px rgba(74, 222, 128, 0.2);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Cursor piscante no final do texto */
.typing-terminal-box::after {
    content: '█';
    display: inline-block;
    margin-left: 6px;
    color: var(--magic-green);
    animation: blink-cursor-block 0.9s infinite;
    font-size: 1.2rem;
    vertical-align: middle;
}

@keyframes blink-cursor-block {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes bounce-slow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.animate-bounce-slow {
    animation: bounce-slow 3s infinite ease-in-out;
}

/* Layout da linha do sumário */
.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.125rem;
    padding: 0.5rem 0;
}
.summary-row.hidden {
    display: none;
}

@media (max-width: 768px) {
    .magic-checkout-container::before,
    .magic-checkout-container::after {
        inset: -1px;
    }
    #cart-order-summary-wrapper .text-4xl {
        font-size: 2rem;
    }
}