/**
 * DirectPress Orçamento V2 - Estilos CSS
 * Sistema de orçamentos usando checkout WooCommerce
 */

/* ===== CAMPOS DA GRÁFICA ===== */
.directpress-grafica-fields {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.directpress-grafica-fields h4 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.field-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.field {
    margin-bottom: 15px;
}

.field label {
    display: block;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 5px;
    font-size: 14px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.field textarea {
    resize: vertical;
    min-height: 80px;
}

/* ===== DETALHES NO CARRINHO ===== */
.directpress-detalhes-carrinho {
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    padding: 10px;
    margin: 10px 0;
    border-radius: 0 5px 5px 0;
    font-size: 13px;
    line-height: 1.4;
}

.directpress-detalhes-carrinho strong {
    color: #2c3e50;
    font-size: 14px;
}

/* ===== CHECKOUT PERSONALIZADO ===== */
.directpress-checkout-notice {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin: 20px 0;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.directpress-checkout-notice h2 {
    margin: 0 0 15px 0;
    font-size: 28px;
    font-weight: 600;
}

.directpress-checkout-notice p {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
}

/* ===== PÁGINA DE SUCESSO ===== */
.directpress-checkout-success {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    padding: 40px;
    border-radius: 15px;
    margin: 30px 0;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.directpress-checkout-success h2 {
    margin: 0 0 20px 0;
    font-size: 32px;
    font-weight: 600;
}

.directpress-checkout-success p {
    margin: 10px 0;
    font-size: 18px;
    opacity: 0.9;
}

.directpress-whatsapp-btn {
    display: inline-block;
    background: white;
    color: #25D366;
    padding: 15px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.directpress-whatsapp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    color: #25D366;
    text-decoration: none;
}

/* ===== MENSAGEM DE PAGAMENTO PERSONALIZADA ===== */
.directpress-payment-notice {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.directpress-payment-notice h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 600;
}

.directpress-payment-notice p {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
}

/* ===== PRODUTOS SEM PREÇO ===== */
.price-orcamento {
    color: #e67e22;
    font-weight: bold;
    font-size: 1.2em;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse-orcamento 2s infinite;
}

@keyframes pulse-orcamento {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Destaque para produtos que requerem orçamento */
.product.type-product:has(.price-orcamento) {
    border: 2px solid #f39c12;
    border-radius: 10px;
    padding: 10px;
    background: linear-gradient(135deg, #fff9e6, #ffffff);
}

/* Badge para produtos de orçamento */
.product.type-product:has(.price-orcamento)::before {
    content: "🎨 ORÇAMENTO";
    position: absolute;
    top: 10px;
    right: 10px;
    background: #f39c12;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 10;
}

/* ===== OCULTAR PREÇOS ===== */
.woocommerce-cart-form .product-price,
.woocommerce-cart-form .product-subtotal,
.woocommerce-Price-amount,
.e-cart__column-end {
    display: none !important;
}

/* Ocultar seção de total no checkout para orçamentos */
.woocommerce-checkout-review-order-table .cart-subtotal,
.woocommerce-checkout-review-order-table .order-total,
.woocommerce-checkout-review-order-table .cart-discount,
.woocommerce-checkout-review-order-table .shipping,
.woocommerce-checkout-review-order-table .tax-rate,
.woocommerce-checkout-review-order-table .woocommerce-Price-amount,
.woocommerce-checkout-review-order-table tfoot,
.woocommerce-checkout-review-order-table .product-total {
    display: none !important;
}

.woocommerce-checkout-review-order-table .cart-subtotal td,
.woocommerce-checkout-review-order-table .order-total td,
.woocommerce-checkout-review-order-table .product-total td {
    display: none !important;
}

/* Ocultar preços em outras seções do checkout */
.woocommerce-checkout .woocommerce-Price-amount,
.woocommerce-checkout .cart-subtotal,
.woocommerce-checkout .order-total,
.woocommerce-checkout .product-total {
    display: none !important;
}

/* Ocultar preços individuais dos produtos no checkout */
.woocommerce-checkout-review-order-table .product-total,
.woocommerce-checkout-review-order-table .woocommerce-Price-amount {
    display: none !important;
}

/* Ocultar coluna de preço no resumo do pedido */
.woocommerce-checkout-review-order-table .product-total {
    display: none !important;
}

.woocommerce-checkout-review-order-table .product-total td {
    display: none !important;
}

/* ===== BOTÃO DE ORÇAMENTO ===== */
.directpress-orcamento-btn {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
    color: white !important;
    border: none !important;
    padding: 15px 40px !important;
    border-radius: 25px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3) !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
}

.directpress-orcamento-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4) !important;
}

.directpress-orcamento-btn:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.3) !important;
}

/* ===== CAMPOS DO CHECKOUT ===== */
.woocommerce-checkout .form-row textarea {
    min-height: 100px;
    resize: vertical;
}

.woocommerce-checkout .form-row label {
    font-weight: 600;
    color: #2c3e50;
}

.woocommerce-checkout .form-row input:focus,
.woocommerce-checkout .form-row textarea:focus {
    border-color: #25D366;
    box-shadow: 0 0 5px rgba(37, 211, 102, 0.3);
}

/* ===== SWEETALERT PERSONALIZADO ===== */
.swal2-popup {
    border-radius: 15px !important;
}

.swal2-title {
    color: #2c3e50 !important;
}

.swal2-confirm {
    background-color: #25D366 !important;
    border-radius: 25px !important;
    padding: 10px 25px !important;
}

.swal2-cancel {
    background-color: #95a5a6 !important;
    border-radius: 25px !important;
    padding: 10px 25px !important;
}

.swal2-loader {
    border-color: #25D366 transparent #25D366 transparent !important;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .field-group {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .field input,
    .field select,
    .field textarea {
        padding: 8px;
        font-size: 16px; /* Evita zoom no iOS */
    }
    
    .directpress-checkout-notice {
        padding: 20px;
        margin: 15px 0;
    }
    
    .directpress-checkout-notice h2 {
        font-size: 24px;
    }
    
    .directpress-orcamento-btn {
        width: 100% !important;
        padding: 12px 20px !important;
        font-size: 14px !important;
    }
}

/* ===== ANIMAÇÕES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.directpress-grafica-fields,
.directpress-checkout-notice {
    animation: fadeInUp 0.5s ease-out;
}

/* ===== ESTADOS DE VALIDAÇÃO ===== */
.field.error input,
.field.error select,
.field.error textarea {
    border-color: #e74c3c;
    box-shadow: 0 0 5px rgba(231, 76, 60, 0.3);
}

.field.success input,
.field.success select,
.field.success textarea {
    border-color: #27ae60;
    box-shadow: 0 0 5px rgba(39, 174, 96, 0.3);
}

/* ===== MENSAGENS DE ERRO/SUCESSO ===== */
.directpress-message {
    padding: 10px 15px;
    border-radius: 5px;
    margin: 10px 0;
    font-size: 14px;
}

.directpress-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.directpress-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* ===== MELHORAR APARÊNCIA DOS PRODUTOS NO CARRINHO ===== */
.cart_item .product-name {
    width: 100% !important;
}

/* ===== LOADING STATES ===== */
.directpress-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.directpress-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
