/**
 * Public CSS for Catálogo Expresso
 *
 * @package    Catalogo_Expresso
 * @subpackage Public/CSS
 * @since      1.0.0
 */

/* ==========================================================================
   PRICE ON REQUEST
   ========================================================================== */

.ce-price-on-request {
    font-weight: 600;
    color: #666;
    font-style: italic;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    display: inline-block;
}

.woocommerce .ce-price-on-request {
    color: #666 !important;
}

.cart .ce-price-on-request {
    font-size: 14px;
    background: #fff3cd;
    color: #856404 !important;
    border-color: #ffeaa7;
}

/* ==========================================================================
   ADD TO CART WRAPPER
   ========================================================================== */

.ce-add-to-cart-wrapper .cart .single_add_to_cart_button {
    background-color: #667eea;
    border-color: #667eea;
}

.ce-add-to-cart-wrapper .cart .single_add_to_cart_button:hover {
    background-color: #5a6fd8;
    border-color: #5a6fd8;
}

/* ==========================================================================
   GATEWAY INSTRUCTIONS
   ========================================================================== */

.ce-gateway-instructions {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.ce-gateway-instructions h3 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 18px;
    font-weight: 600;
}

.ce-gateway-instructions p {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #6c757d;
}

.ce-gateway-instructions p:last-child {
    margin-bottom: 0;
}

.ce-gateway-instructions strong {
    color: #495057;
}

/* Email styles */
.woocommerce-email .ce-gateway-instructions {
    background: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
    border-radius: 8px !important;
    padding: 20px !important;
    margin: 20px 0 !important;
}

.woocommerce-email .ce-gateway-instructions h3 {
    margin: 0 0 15px 0 !important;
    color: #495057 !important;
    font-size: 18px !important;
}

/* ==========================================================================
   QUOTE BUTTONS
   ========================================================================== */

.ce-quote-buttons-wrapper {
    margin: 20px 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ce-quote-modal-btn,
.ce-whatsapp-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
}

.ce-quote-modal-btn {
    background-color: #0073aa;
    color: #ffffff;
}

.ce-quote-modal-btn:hover {
    background-color: #005a87;
    color: #ffffff;
}

.ce-whatsapp-btn {
    background-color: #25d366;
    color: #ffffff;
}

.ce-whatsapp-btn:hover {
    background-color: #128c7e;
    color: #ffffff;
    text-decoration: none;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .ce-quote-buttons-wrapper {
        flex-direction: column;
    }
    
    .ce-quote-modal-btn,
    .ce-whatsapp-btn {
        width: 100%;
        min-width: auto;
    }
}

/* ==========================================================================
   MODAL
   ========================================================================== */

.ce-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.ce-modal-content {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: ce-modal-fadeIn 0.3s ease-out;
}

@keyframes ce-modal-fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.ce-modal-header {
    padding: 20px 20px 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ce-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.ce-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.ce-modal-close:hover {
    background-color: #f5f5f5;
    color: #333;
}

.ce-modal-body {
    padding: 20px;
}

.ce-product-info {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid #0073aa;
}

.ce-product-info strong {
    color: #333;
}

/* ==========================================================================
   FORM STYLES
   ========================================================================== */

.ce-form-group {
    margin-bottom: 20px;
}

.ce-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.ce-form-group input[type="text"],
.ce-form-group input[type="tel"],
.ce-form-group input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.ce-form-group input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.ce-lgpd-group {
    margin-bottom: 25px;
}

.ce-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: normal;
}

.ce-checkbox-label input[type="checkbox"] {
    margin: 0;
    flex-shrink: 0;
    margin-top: 2px;
}

.ce-checkbox-text {
    font-size: 14px;
    line-height: 1.5;
    color: #666;
}

.ce-form-actions {
    margin-top: 25px;
    text-align: center;
}

.ce-submit-btn {
    background-color: #0073aa;
    color: #ffffff;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 150px;
}

.ce-submit-btn:hover {
    background-color: #005a87;
}

.ce-submit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* ==========================================================================
   MESSAGES
   ========================================================================== */

.ce-form-messages {
    margin-top: 15px;
}

.ce-message {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 14px;
}

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

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

.ce-message-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* ==========================================================================
   HIDE PRICES (Fallback CSS)
   ========================================================================== */

.ce-catalog-mode-full .price,
.ce-catalog-mode-full .woocommerce-Price-amount,
.ce-catalog-mode-full .amount,
.ce-catalog-mode-full .wc-price,
.ce-catalog-mode-full .product-price,
.ce-catalog-mode-full .price-wrapper,
.ce-catalog-mode-full .price-container,
.ce-catalog-mode-full .woocommerce-price,
.ce-catalog-mode-full .woocommerce-variation-price {
    display: none !important;
}

/* ==========================================================================
   MOBILE OPTIMIZATIONS
   ========================================================================== */

@media (max-width: 480px) {
    .ce-modal-content {
        margin: 10px;
        max-height: 95vh;
    }
    
    .ce-modal-header,
    .ce-modal-body {
        padding: 15px;
    }
    
    .ce-form-group input[type="text"],
    .ce-form-group input[type="tel"],
    .ce-form-group input[type="email"] {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .ce-submit-btn {
        width: 100%;
        padding: 15px;
    }
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

.ce-modal-overlay:focus-within .ce-modal-content {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.ce-form-group input:invalid {
    border-color: #dc3545;
}

.ce-form-group input:valid {
    border-color: #28a745;
}

/* Screen reader only */
.ce-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}