/* ==========================================================================
   WCL Order Query Styles
   ========================================================================== */

/* Container principal */
.wcl-order-query-container {
    max-width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
}

/* Formulário de consulta */
.wcl-consulta-pedido-form {
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

/* Borda superior removida para design mais limpo */

/* Layout do formulário - Responsivo com transição suave */
.wcl-consulta-pedido-form .wcl-consulta-fields {
    display: grid;
    grid-template-columns: 1fr 1fr auto; /* Desktop: 2 campos + botão na mesma linha */
    gap: 24px;
    align-items: end; /* Alinha todos os elementos na base */
    margin: 28px 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
    box-shadow: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsividade - Desktop Grande */
@media (min-width: 1200px) {
    .wcl-order-status-card {
        max-width: 900px;
    }
    
    .wcl-info-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 12px;
    }
    
    .wcl-products-list {
        gap: 8px;
    }
    
    .wcl-product-item {
        padding: 10px 16px;
    }
}

/* Responsividade - Tablet */
@media (min-width: 769px) and (max-width: 1199px) {
    .wcl-consulta-pedido-form .wcl-consulta-fields {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }
    
    .wcl-order-status-card {
        max-width: 95%;
        width: 90%;
        margin: 15px auto;
    }
    
    .wcl-info-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 10px;
    }
    
    .wcl-products-list {
        gap: 7px;
    }
    
    .wcl-product-item {
        padding: 9px 14px;
    }
}

/* Responsividade Mobile - Otimizado */
@media (max-width: 768px) {
    .wcl-consulta-pedido-form .wcl-consulta-fields {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 12px;
    }
    
    .wcl-order-status-card {
        max-width: 98%;
        width: 95%;
        margin: 8px auto;
        border-radius: 6px;
    }
    
    .wcl-order-status-card .wcl-order-header {
        padding: 10px 30px 10px 12px;
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }
    
    .wcl-order-status-card .wcl-order-id {
        font-size: 18px;
    }
    
    .wcl-order-info-section {
        padding: 12px 14px;
    }
    
    .wcl-section-title {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .wcl-info-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .wcl-product-item {
        padding: 8px 10px;
        flex-direction: column;
        gap: 6px;
    }
    
    .wcl-product-prices {
        align-items: flex-start;
        width: 100%;
    }
    
    .wcl-totals-summary {
        padding: 10px 12px;
    }
    
    .wcl-total-final {
        padding: 8px 10px;
    }
    
    .wcl-final-amount {
        font-size: 16px;
    }
    
    .wcl-consulta-close {
        width: 24px;
        height: 24px;
        min-width: 24px;
        min-height: 24px;
        font-size: 14px;
        top: 8px;
        right: 8px;
        color: var(--wcl-status-template-color, #b90940);
        background: rgba(255, 255, 255, 0.95);
        border-radius: 4px;
    }
}

/* Botão agora está diretamente no grid - sem container separado */

.wcl-consulta-pedido-form input {
    width: 100%;
    min-width: 200px; /* Largura mínima para desktop */
    padding: 14px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 5px; /* Border radius padronizado para 5px */
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    color: #1f2937;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
}

.wcl-consulta-pedido-form input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.wcl-consulta-pedido-form input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.wcl-consulta-pedido-form button {
    width: auto;
    min-width: 160px; /* Largura mínima para desktop */
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 16px 36px; /* Mesmo padding vertical dos campos de entrada */
    border-radius: 5px; /* Border radius padronizado para 5px */
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 12px rgba(59, 130, 246, 0.25);
    margin-top: 0;
    box-sizing: border-box;
    white-space: nowrap;
    height: auto; /* Garante que a altura seja calculada pelo padding */
    line-height: 1.2; /* Controla a altura da linha do texto */

    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.wcl-consulta-pedido-form button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.wcl-consulta-pedido-form button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.4);
}

.wcl-consulta-pedido-form button:hover::before {
    left: 100%;
}

.wcl-consulta-pedido-form button:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

/* Loader - Design Melhorado */
.wcl-consulta-loading {
    text-align: center;
    padding: 40px 30px;
    font-size: 16px;
    color: #6b7280;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    margin: 24px auto;
    max-width: 450px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.wcl-consulta-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--wcl-status-template-color, #b90940), transparent);
    animation: loading-shimmer 2s infinite;
}

@keyframes loading-shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Template Responsivo - Design Otimizado */
.wcl-order-status-card {
    background: #F2F2F2;
    border-radius: 6px;
    padding: 0;
    position: relative;
    max-width: 800px;
    width: 95%;
    margin: 10px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
    border: 1px solid #E0E0E0;
}

/* Header extremamente compacto */
.wcl-order-status-card .wcl-order-header {
    background: linear-gradient(135deg, var(--wcl-status-template-color, #b90940) 0%, var(--wcl-status-template-light, #d41159) 100%);
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    border-bottom: none;
    position: relative;
}

.wcl-order-status-card .wcl-order-number {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wcl-order-status-card .wcl-order-label {
    font-size: 13px;
    color: #ffffff;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.wcl-order-status-card .wcl-order-id {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Container para alinhar badge e botão na mesma linha */
.wcl-order-status-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wcl-order-status-card .wcl-order-status {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    backdrop-filter: blur(10px);
    overflow: hidden;
    white-space: normal;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    text-align: center;
    min-width: 100px;
}

/* Seções ultra compactas */
.wcl-order-info-section {
    padding: 12px;
    position: relative;
    background: #F2F2F2;
    border-bottom: 1px solid #E0E0E0;
}

.wcl-order-info-section:last-child {
    border-bottom: none;
}

.wcl-order-info-section:last-child {
    border-radius: 0 0 8px 8px;
}

/* Cor uniforme para todas as seções */
.wcl-order-info-section {
    background: #F2F2F2 !important;
}

.wcl-section-title {
    margin: 0 0 8px 0;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #1e293b;
}

/* Garantia adicional para aplicação das cores das seções */
.wcl-order-status-card .wcl-order-info-section:nth-of-type(1) .wcl-section-title {
    color: var(--wcl-general-section-color, #495057);
}

.wcl-order-status-card .wcl-order-info-section:nth-of-type(2) .wcl-section-title {
    color: var(--wcl-products-section-color, #495057);
}

.wcl-order-status-card .wcl-order-info-section:nth-of-type(3) .wcl-section-title {
    color: var(--wcl-delivery-section-color, #495057);
}

.wcl-order-status-card .wcl-order-info-section:nth-of-type(4) .wcl-section-title,
.wcl-order-status-card .wcl-order-info-section:last-child .wcl-section-title {
    color: var(--wcl-financial-section-color, #495057);
}

/* Grid responsivo de informações */
.wcl-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
    align-items: start;
}

.wcl-info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
    padding: 6px 8px;
    background: #ffffff;
    border-radius: 4px;
    border: 1px solid #E0E0E0;
}

.wcl-info-label {
    font-size: 10px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 1px;
}

.wcl-info-value {
    font-size: 14px;
    color: #1f2937;
    font-weight: 600;
    line-height: 1.4;
}

/* Lista de produtos responsiva */
.wcl-products-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wcl-product-item {
    background: #ffffff;
    border: 1px solid #E0E0E0;
    border-radius: 4px;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.wcl-product-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    padding-right: 8px;
}

.wcl-product-name {
    font-size: 12px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.wcl-product-quantity {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
    line-height: 1.4;
}

.wcl-product-prices {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.wcl-unit-price {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 500;
    text-decoration: line-through;
    opacity: 0.8;
}

.wcl-item-total {
    font-size: 14px;
    font-weight: 700;
    color: #059669;
    letter-spacing: -0.025em;
}

/* Informações de entrega extremamente compactas */
.wcl-delivery-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wcl-delivery-address {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wcl-address-details {
    background: #ffffff;
    border: 1px solid #E0E0E0;
    border-radius: 4px;
    padding: 6px 8px;
    line-height: 1.3;
    font-size: 11px;
}

.wcl-address-name {
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
    font-size: 16px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 8px;
}

.wcl-address-line {
    color: #374151;
    font-size: 14px;
    margin-bottom: 4px;
    font-weight: 500;
}

.wcl-address-line:last-child {
    margin-bottom: 0;
}

/* Resumo financeiro extremamente compacto */
.wcl-totals-summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: #F2F2F2;
    border-radius: 4px;
    padding: 8px;
}

.wcl-total-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
}

.wcl-total-label {
    font-size: 10px;
    color: #374151;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.wcl-total-value {
    font-size: 12px;
    font-weight: 600;
    color: #059669;
    letter-spacing: -0.025em;
}

.wcl-total-final {
    background: #ffffff;
    color: #0f172a;
    border-radius: 4px;
    padding: 8px;
    margin-top: 6px;
    border: 1px solid #E0E0E0;
}

.wcl-total-final .wcl-total-label {
    color: #1f2937;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}

.wcl-final-amount {
    font-size: 14px;
    font-weight: 700;
    color: var(--wcl-status-template-color, #b90940);
    letter-spacing: -0.2px;
}

/* Card de resultado - Template Ultra Compacto */
.wcl-consulta-card-compact {
    background: #F2F2F2;
    border-radius: 6px;
    padding: 12px;
    margin-top: 10px;
    position: relative;
    animation: slideIn 0.3s ease-out;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid #E0E0E0;
}

/* Header do card extremamente compacto */
.wcl-consulta-card h3 {
    margin-top: 0;
    font-size: 16px;
    font-weight: 700;
    color: #343a40;
    margin-bottom: 12px;
    text-align: center;
}

/* Header do pedido - Template Ultra Compacto */
.wcl-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #E0E0E0;
}

.wcl-order-number {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wcl-order-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.wcl-order-id {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.wcl-order-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    min-width: 80px;
}

/* Informações principais - Template Compacto */
.wcl-order-main-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wcl-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid #f8f8f8;
}

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

.wcl-info-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
    min-width: 60px;
    flex-shrink: 0;
}

.wcl-info-value {
    font-size: 13px;
    color: #333;
    text-align: right;
    flex: 1;
    margin-left: 12px;
}

.wcl-info-value.wcl-total {
    font-weight: 700;
    color: var(--wcl-status-template-color, #b90940);
    font-size: 14px;
}

.wcl-more-items {
    color: #888;
    font-size: 11px;
    margin-left: 4px;
}

.wcl-cep {
    color: #888;
    font-size: 11px;
    margin-left: 4px;
}

/* Seções organizadas */
.wcl-consulta-section {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    padding: 16px 18px;
    border-radius: 10px;
    margin: 15px 0;
    border-left: 3px solid var(--wcl-status-template-color, #b90940);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.wcl-consulta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, var(--wcl-status-template-color, #b90940), transparent);
}

.wcl-consulta-section h4 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--wcl-status-template-color, #b90940);
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 13px;
}

.wcl-consulta-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 10px 0;
}

.wcl-consulta-info-item {
    background: #fff;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.wcl-consulta-info-item:hover {
    box-shadow: 0 2px 6px color-mix(in srgb, var(--wcl-status-template-color, #b90940) 8%, transparent);
    border-color: var(--wcl-status-template-color, #b90940);
}

.wcl-consulta-info-item strong {
    color: var(--wcl-status-template-color, #b90940);
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.wcl-consulta-info-value {
    color: #212529;
    font-size: 14px;
    font-weight: 500;
}

/* Lista de produtos compacta */
.wcl-consulta-produtos-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wcl-consulta-produtos-list li {
    background: #fff;
    padding: 10px 14px;
    margin: 6px 0;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.wcl-consulta-produtos-list li:hover {
    box-shadow: 0 2px 6px color-mix(in srgb, var(--wcl-status-template-color, #b90940) 6%, transparent);
    border-color: var(--wcl-status-template-color, #b90940);
}

.wcl-produto-nome {
    color: #495057;
    font-weight: 500;
}

.wcl-produto-qtd {
    background: linear-gradient(135deg, var(--wcl-status-template-color, #b90940), var(--wcl-status-template-dark, #9a0735));
    color: #fff;
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 1px 3px color-mix(in srgb, var(--wcl-status-template-color, #b90940) 30%, transparent);
}

/* Endereço compacto */
.wcl-endereco-entrega {
    background: #fff;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    font-size: 13px;
    line-height: 1.4;
    color: #495057;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.wcl-endereco-entrega:hover {
    box-shadow: 0 2px 6px color-mix(in srgb, var(--wcl-status-template-color, #b90940) 6%, transparent);
    border-color: var(--wcl-status-template-color, #b90940);
}

/* Status profissional melhorado */
.wcl-consulta-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    margin: 12px 0 18px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 140px;
}

.wcl-consulta-status::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.wcl-consulta-status:hover::before {
    left: 100%;
}

/* Status - Template Compacto */
.wcl-order-status.wcl-status-pending {
    background: #fff3cd;
    color: #856404;
}

.wcl-order-status.wcl-status-processing {
    background: #d1ecf1;
    color: #0c5460;
}

.wcl-order-status.wcl-status-completed {
    background: #d4edda;
    color: #155724;
}

.wcl-order-status.wcl-status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

/* Erro */
.wcl-consulta-erro {
    color: #721c24;
    background: linear-gradient(135deg, #f8d7da, #f1a7aa);
    border: 2px solid #dc3545;
    padding: 18px 20px;
    border-radius: 10px;
    text-align: center;
    max-width: 500px;
    margin: 20px auto;
    animation: wcl-fadeIn 0.3s ease-in-out;
    font-weight: 500;
    font-size: 15px;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.15);
}

.wcl-consulta-close {
    position: static;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.4);
    font-size: 16px;
    color: var(--wcl-status-template-color, #b90940);
    cursor: pointer;
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    backdrop-filter: blur(10px);
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
}



/* Animações */
@keyframes wcl-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wcl-slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}





/* Rodapé extremamente compacto */
.wcl-order-footer {
    background: #F2F2F2;
    padding: 6px 8px;
    text-align: center;
    border-top: 1px solid #E0E0E0;
    color: #64748b;
    font-size: 10px;
    position: relative;
    overflow: hidden;
    margin-top: 0;
}

.wcl-order-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--wcl-status-template-color, #b90940);
}

.wcl-footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.wcl-footer-info {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.wcl-footer-text {
    font-size: 11px;
    font-weight: 500;
    color: #ffffff;
    letter-spacing: 0.025em;
}

.wcl-footer-separator {
    font-size: 13px;
    color: #64748b;
    font-weight: 400;
}

.wcl-order-footer p {
    margin: 0;
    line-height: 1.6;
    font-weight: 500;
    letter-spacing: 0.025em;
}

.wcl-order-footer strong {
    color: #1e293b;
    font-weight: 700;
}

/* Animações para mudança de cor */
.wcl-section-title {
    transition: color 0.3s ease, border-color 0.3s ease;
}

.wcl-section-title.color-transition {
    animation: colorPulse 0.6s ease;
}

@keyframes colorPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Responsividade */
@media (max-width: 768px) {
    .wcl-order-query-container {
        padding: 16px;
        margin: 16px auto;
    }
    
    .wcl-consulta-pedido-form {
        padding: 20px;
    }
    
    /* Layout vertical para mobile */
    .wcl-consulta-pedido-form .wcl-consulta-fields {
        grid-template-columns: 1fr; /* Mobile: layout vertical */
        gap: 12px;
        padding: 16px;
        margin: 16px 0;
    }
    
    .wcl-consulta-pedido-form input {
        min-width: unset;
        font-size: 16px; /* Evita zoom no iOS */
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Botão ocupa largura total em mobile */
    .wcl-consulta-pedido-form button {
        width: 100%;
        max-width: none;
        min-width: unset;
        margin-top: 0;
        box-sizing: border-box;
    }
    
    /* Garantir que todos os elementos do formulário sejam responsivos */
    .wcl-consulta-pedido-form,
    .wcl-consulta-fields,
    .wcl-consulta-pedido-form input,
    .wcl-consulta-pedido-form button {
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Template detalhado responsivo */
    .wcl-order-status-card {
        margin: 15px;
        max-width: none;
        border-radius: 12px;
    }
    
    .wcl-order-status-card .wcl-order-header {
        padding: 12px 40px 12px 12px; /* Mantém espaço para o botão fechar em mobile */
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .wcl-order-status-card .wcl-order-id {
        font-size: 18px;
        color: #ffffff;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    }
    
    .wcl-order-status-card .wcl-order-status {
         align-self: center;
         font-size: 13px;
         padding: 6px 12px;
         max-width: calc(100% - 30px); /* Ajusta para mobile */
     }
     
     .wcl-order-info-section {
          padding: 10px 12px;
          margin-bottom: 1px;
      }
      
      .wcl-section-title {
          font-size: 13px;
          font-weight: 700;
          margin-bottom: 8px;
          padding-bottom: 4px;
          border-bottom: 2px solid color-mix(in srgb, var(--wcl-status-template-color, #b90940) 10%, transparent);
      }
      

     
     .wcl-info-grid {
         grid-template-columns: 1fr;
         gap: 8px;
     }
    
    .wcl-product-item {
         flex-direction: column;
         gap: 6px;
         align-items: stretch;
         padding: 8px;
     }
     
     .wcl-product-prices {
         align-items: flex-start;
         flex-direction: row;
         justify-content: space-between;
     }
     
     .wcl-address-details {
         padding: 8px;
     }
     
     .wcl-order-footer {
         margin-top: 20px;
         padding: 14px 0;
     }
     
     .wcl-footer-info {
         flex-direction: column;
         gap: 6px;
     }
     
     .wcl-footer-text {
         font-size: 10px;
     }
     
     .wcl-footer-separator {
         font-size: 10px;
     }
     
     .wcl-total-final {
         padding: 8px;
     }
    
    .wcl-final-amount {
        font-size: 16px;
    }
    
    /* Template compacto responsivo */
    .wcl-consulta-card-compact {
        margin: 15px 10px;
        padding: 16px;
        max-width: none;
    }
    
    .wcl-order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .wcl-order-status {
        align-self: flex-end;
    }
    
    .wcl-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .wcl-info-value {
        text-align: left;
        margin-left: 0;
    }
    
    .wcl-consulta-card h3 {
        font-size: 18px;
    }
    
    .wcl-consulta-status {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    .wcl-consulta-info-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .wcl-consulta-produtos-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        padding: 6px 10px;
    }
    
    /* Regra duplicada removida - já controlada acima */
}

@media (max-width: 480px) {
    .wcl-consulta-card {
        padding: 12px;
    }
    
    .wcl-consulta-card h3 {
        font-size: 16px;
    }
    
    .wcl-consulta-status {
        font-size: 12px;
        padding: 5px 10px;
    }
    
    .wcl-consulta-section {
        padding: 10px 12px;
        margin: 8px 0;
    }
    
    .wcl-consulta-info-item {
        padding: 8px 10px;
    }
}

/* ==========================================================================
   Histórico de Pedidos - Timeline
   ========================================================================== */

.wcl-order-history {
    margin-top: 16px;
}

.wcl-history-timeline {
    position: relative;
    padding-left: 0;
    margin: 0;
}

.wcl-history-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin-bottom: 24px;
    padding-left: 48px;
}

.wcl-history-item:last-child {
    margin-bottom: 0;
}

.wcl-history-marker {
    position: absolute;
    left: 0;
    top: 2px;
    width: 32px;
    height: 32px;
    background: #f8f9fa;
    border: 2px solid var(--wcl-status-template-color, #b90940);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.3s ease;
}

.wcl-history-item.wcl-current-status .wcl-history-marker {
    background: var(--wcl-status-template-color, #b90940);
    border-color: var(--wcl-status-template-color, #b90940);
    box-shadow: 0 0 0 4px rgba(185, 9, 64, 0.2);
    transform: scale(1.1);
}

.wcl-history-icon {
    font-size: 14px;
    line-height: 1;
}

.wcl-current-status .wcl-history-icon {
    filter: brightness(0) invert(1);
}

.wcl-history-line {
    position: absolute;
    left: 15px;
    top: 34px;
    bottom: -24px;
    width: 2px;
    background: linear-gradient(to bottom, var(--wcl-status-template-color, #b90940) 0%, #e9ecef 100%);
    z-index: 1;
}

.wcl-history-content {
    flex: 1;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.wcl-history-item.wcl-current-status .wcl-history-content {
    border-color: var(--wcl-status-template-color, #b90940);
    box-shadow: 0 4px 12px rgba(185, 9, 64, 0.15);
    background: linear-gradient(135deg, #ffffff 0%, rgba(185, 9, 64, 0.02) 100%);
}

.wcl-history-status {
    font-weight: 600;
    font-size: 14px;
    color: #495057;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wcl-current-status .wcl-history-status {
    color: var(--wcl-status-template-color, #b90940);
}

.wcl-current-badge {
    background: var(--wcl-status-template-color, #b90940);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wcl-history-date {
    font-size: 12px;
    color: #6c757d;
    font-weight: 400;
}

/* Status específicos */
.wcl-status-pending .wcl-history-status {
    color: #ffc107;
}

.wcl-status-processing .wcl-history-status {
    color: #17a2b8;
}

.wcl-status-on-hold .wcl-history-status {
    color: #fd7e14;
}

.wcl-status-completed .wcl-history-status {
    color: #28a745;
}

.wcl-status-cancelled .wcl-history-status {
    color: #dc3545;
}

.wcl-status-refunded .wcl-history-status {
    color: #6f42c1;
}

.wcl-status-failed .wcl-history-status {
    color: #dc3545;
}

/* Responsividade do histórico */
@media (max-width: 768px) {
    .wcl-history-item {
        padding-left: 40px;
        margin-bottom: 20px;
    }
    
    .wcl-history-marker {
        width: 28px;
        height: 28px;
    }
    
    .wcl-history-line {
        left: 13px;
        top: 30px;
        bottom: -20px;
    }
    
    .wcl-history-content {
        padding: 12px;
    }
    
    .wcl-history-status {
        font-size: 13px;
    }
    
    .wcl-history-date {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .wcl-history-item {
        padding-left: 36px;
        margin-bottom: 16px;
    }
    
    .wcl-history-marker {
        width: 24px;
        height: 24px;
    }
    
    .wcl-history-icon {
        font-size: 12px;
    }
    
    .wcl-history-line {
        left: 11px;
        top: 26px;
        bottom: -16px;
    }
    
    .wcl-history-content {
        padding: 10px;
    }
    
    .wcl-current-badge {
        font-size: 9px;
        padding: 1px 4px;
    }
}