/* ============================================
   PEDIDOS.CSS - Estilos para a página de consulta de pedidos
   ============================================ */

/* --- Header --- */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}
.header-title h1 {
    color: #333;
    font-size: 2.5em;
    margin-bottom: 5px;
}
.header-title p {
    color: #666;
    font-size: 1.1em;
    margin: 0;
}

/* --- Botão Voltar --- */
.btn-support-header.premium-gray {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}
.btn-support-header.premium-gray:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* --- Seção de busca --- */
.search-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    border: 1px solid #e0e0e0;
}
.search-box {
    display: flex;
    gap: 10px;
    align-items: center;
}
.search-box input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}
.search-box input:focus {
    outline: none;
    border-color: #667eea;
}
.btn-search {
    padding: 12px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}
.btn-search:hover {
    background: #5a6fd6;
}
.search-info {
    margin-top: 10px;
    color: #888;
    font-size: 14px;
}

/* --- Itens de pedido (resultados) --- */
.order-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s;
}
.order-item:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.order-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}
.order-id {
    font-weight: 700;
    color: #333;
}
.order-service {
    color: #666;
}
.order-quantity {
    color: #666;
}
.order-link {
    margin-top: 5px;
    font-size: 13px;
    color: #888;
    word-break: break-all;
}
.order-date {
    color: #888;
    font-size: 13px;
}
.order-smm-id {
    font-size: 12px;
    color: #666;
    margin-top: 3px;
}

/* --- Status --- */
.status-inprogress, .status-processando {
    color: #ffc107;
    font-weight: 600;
}
.status-partial {
    color: #fd7e14;
    font-weight: 600;
}
.status-completed, .status-concluido {
    color: #28a745;
    font-weight: 600;
}
.status-pending, .status-aguardando {
    color: #17a2b8;
    font-weight: 600;
}
.status-cancelled, .status-cancelado {
    color: #dc3545;
    font-weight: 600;
}
.status-error, .status-erro {
    color: #dc3545;
    font-weight: 600;
}

/* --- Loading e erro --- */
.loading {
    text-align: center;
    padding: 40px;
    color: #888;
}
.loading.error {
    color: #dc3545;
}

/* --- Detalhes do pedido (modal) --- */
.order-detail {
    padding: 10px 0;
}
.detail-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}
.detail-row:last-child {
    border-bottom: none;
}
.detail-label {
    font-weight: 600;
    width: 100px;
    color: #555;
}
.detail-value {
    flex: 1;
    color: #333;
}
.order-warning {
    margin-top: 15px;
    padding: 12px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    color: #856404;
    text-align: center;
}
.order-error {
    margin-top: 15px;
    padding: 12px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    color: #721c24;
    text-align: center;
}

/* --- Modal (reutilizado) --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    animation: fadeIn 0.3s;
}
.modal-content {
    background: white;
    margin: 10% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideIn 0.3s;
}
.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h3 {
    margin: 0;
    color: #333;
}
.close-modal {
    color: #999;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}
.close-modal:hover {
    color: #333;
}
.modal-body {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}
.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    text-align: right;
}
.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}
.btn-secondary:hover {
    background: #5a6268;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* --- Responsividade --- */
@media (max-width: 768px) {
    .search-box {
        flex-direction: column;
    }
    .search-box input {
        width: 100%;
    }
    .btn-search {
        width: 100%;
    }
    .order-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .detail-row {
        flex-direction: column;
    }
    .detail-label {
        width: 100%;
        margin-bottom: 4px;
    }
    .modal-content {
        width: 95%;
        margin: 20% auto;
    }
    .header-content {
        flex-direction: column;
        align-items: center;
    }
    .header-title {
        text-align: center;
    }
}