/* --- MEUS PEDIDOS PAGE --- */
#webapp-orders {
    width: 100%;
    max-width: 860px;
    margin: 90px auto 100px auto;
    padding: 0;
    background-color: transparent;
    /* Tornamos o fundo transparente para o gap aparecer */
    min-height: 48vh;
    box-sizing: border-box;
    display: none;
    /* Escondido por padrão, mostrado via JS */
}



#box-notificacoes {
    background-color: #ffffff;
    border-bottom: 1px solid #bee5eb;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.13);

    /* Faz a caixa azul escapar dos 860px do webapp-orders e preencher a tela inteira da folha branca (900px max) */
    position: relative;
    width: 100vw;
    max-width: 900px;
    left: 50%;
    transform: translateX(-50%);
    box-sizing: border-box;

    /* Puxa para cima para grudar exatamente abaixo do cabeçalho */
    margin-top: -35px;
    margin-bottom: 20px;
    /* Gap entre a caixa e o conteúdo de baixo */
    padding: 20px 15px;
}

/* Estilo para os blocos brancos abaixo da notificação */
#order-list-section .portlet.light,
#order-tracking-section .portlet.light {
    background-color: #ffffff;
    padding: 20px;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    /* Sombra leve para destacar do fundo */
}

.notification-banner {
    background-color: transparent;
    padding: 0;
    text-align: left;
    border-bottom: none;
    font-size: 14px;
    color: #0c5460;
    margin: 0 0 12px 0;
}

.btn-tutorial {
    background-color: #00A808;
    color: #fff;
    width: 100%;
    border: none;
    padding: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    border-radius: 4px;
}

.orders-intro-text {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 20px;
}

.orders-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.order-card {
    border: 2px solid #E7ECF1;
    padding: 15px;
    border-radius: 0;
    background: #fff;
    position: relative;
    display: flex;
    flex-direction: column;
}

.order-id {
    font-weight: 700;
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.order-date {
    font-size: 12px;
    color: #888;
    margin-bottom: 10px;
}

.order-items-label {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.order-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13px;
    color: #444;
    margin-bottom: 12px;
    line-height: 1.4;
}

.order-item .qty {
    background-color: #EEEEEE;
    color: #333;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 0;
    min-width: 12px;
    text-align: center;
    font-size: 12px;
}

.order-item .name {
    flex: 1;
}

.order-status-badge {
    display: none; /* Escondido pois virou botão de ação */
}

.order-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
}

.btn-order-status {
    background-color: #00A808;
    color: #fff;
    border: none;
    padding: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 0;
}

.btn-order-action {
    background: #fff;
    border: 1px solid #000;
    padding: 8px;
    font-size: 13px;
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    border-radius: 0;
    font-weight: 400;
}

.btn-order-action:hover {
    background-color: #f2f2f2;
    border-color: #bbb;
}

/* --- ANDAMENTO SECTION --- */
#order-tracking {
    display: none;
}

.tracking-id-banner {
    background: #fff;
    border: 1px solid #eeeeee;
    border-radius: 50px;
    padding: 8px 15px;
    font-size: 11px;
    color: #555;
    margin: 15px 0;
    width: 100%;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    box-sizing: border-box;
}

.timeline {
    margin: 25px 0;
    padding-left: 30px;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background: #eee;
}

.timeline-item {
    position: relative;
    margin-bottom: 25px;
    padding-left: 10px;
}

.timeline-dot {
    position: absolute;
    left: -30px;
    top: 4px;
    width: 15px;
    height: 15px;
    background: #eee;
    border: 3px solid #fff;
    border-radius: 50%;
    z-index: 2;
}

.timeline-item.active .timeline-dot {
    background: #00A808;
}

.timeline-content {
    display: flex;
    flex-direction: column;
}

.timeline-title {
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

.timeline-time {
    font-size: 12px;
    color: #888;
}

.timeline-info {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.tracking-footer-btns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-top: 30px;
}

.btn-tracking {
    background-color: #00A808;
    color: #fff;
    border: none;
    padding: 10px 5px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-radius: 0;
}

/* --- PIX TRACKING BOX --- */
#pix-tracking-box {
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    margin-top: 15px;
    /* overflow: hidden; -- REMOVIDO PARA O TRIÂNGULO APARECER */
}

.pix-header {
    background-color: #000;
    color: #fff;
    padding: 8px 15px;
    font-size: 13px;
    font-weight: 700;
    position: relative;
    display: inline-block;
    margin-top: 20px;
    /* Desce para ficar dentro do card mas saindo */
    margin-left: -10px;
    /* Menos agressivo para não 'descolar' tanto */
    z-index: 10;
}

.pix-header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    /* Triângulo por baixo como indicado */
    left: 0;
    width: 0;
    height: 0;
    border-top: 10px solid #000;
    border-left: 10px solid transparent;
}

.pix-body {
    padding: 20px 15px;
    text-align: left;
    font-size: 13px;
    color: #333;
}

.pix-body p {
    margin: 0 0 5px 0;
}

.pix-key {
    font-weight: 400;
    font-size: 15px;
    color: #000;
    margin-bottom: 15px !important;
}

.pix-alert {
    color: #555;
    font-weight: 400;
    font-size: 12px;
    margin: 15px 0 !important;
}

.pix-total {
    font-weight: 700;
    font-size: 16px;
    margin-top: 15px;
    color: #333;
}

.btn-pix-whatsapp {
    background-color: #00A808;
    color: #fff;
    width: 100%;
    border: none;
    padding: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    border-radius: 4px;
}

/* Estilos de endereços movidos para o style.css para centralização */


/* --- MOBILE ADJUSTMENTS --- */
@media (max-width: 600px) {
    #box-notificacoes {
        /* Distância ajustada da mobile 80px - 66px(header fixed) = 14px */
        margin-top: -14px;
        /* Padding compensando os 92% da versão mobile (100% - 92% = 8% total, 4% cada lado) */
        padding: 20px 4vw;
    }

    #webapp-orders {
        width: 92%;
        margin: 80px auto 150px auto;
    }

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


/* Custom contrast-compliant yellow theme rules */
.btn-tutorial, .btn-order-status, .btn-tracking, .btn-pix-whatsapp {
    background-color: #FFDE21 !important;
    background: #FFDE21 !important;
    color: #565656 !important;
    transition: all 0.3s ease !important;
}
.btn-tutorial:hover, .btn-order-status:hover, .btn-tracking:hover, .btn-pix-whatsapp:hover {
    background-color: #565656 !important;
    background: #565656 !important;
    color: #FFDE21 !important;
}
.timeline-item.active .timeline-dot {
    background: #FFDE21 !important;
}
