/**
 * DS WooCommerce Smart Quotes - Frontend Styles
 * 
 * @package Dsantos\WooSmartQuotes
 * @since 1.0.0
 */

/* ==========================================================================
   Botão de Orçamento
   ========================================================================== */

.wsq-quote-button {
    display: inline-block;
    margin: 10px 0;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.wsq-quote-button:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.wsq-quote-button:active {
    transform: translateY(0);
}

.wsq-quote-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Botão secundário (ao lado do add to cart) */
.wsq-quote-button--secondary {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.wsq-quote-button--secondary:hover {
    background: #667eea;
    color: #fff;
}

/* ==========================================================================
   Formulário de Orçamento
   ========================================================================== */

.wsq-quote-form {
    max-width: 100%;
}

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

.wsq-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.wsq-form-group label .required {
    color: #e74c3c;
    margin-left: 2px;
}

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

.wsq-form-group input:focus,
.wsq-form-group select:focus,
.wsq-form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.wsq-form-group input.error,
.wsq-form-group select.error,
.wsq-form-group textarea.error {
    border-color: #e74c3c;
}

.wsq-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.wsq-error-message {
    display: block;
    margin-top: 5px;
    color: #e74c3c;
    font-size: 12px;
}

/* Campo condicional B2B */
.wsq-b2b-field {
    display: none;
}

.wsq-b2b-field.wsq-visible {
    display: block;
}

/* ==========================================================================
   Campo de Telefone com País
   ========================================================================== */

.wsq-phone-group {
    display: flex;
    gap: 10px;
}

.wsq-phone-group .wsq-country-select {
    width: 100px;
    flex-shrink: 0;
}

.wsq-phone-group .wsq-phone-input {
    flex: 1;
}

/* ==========================================================================
   Honeypot (oculto)
   ========================================================================== */

.wsq-honeypot {
    position: absolute;
    left: -9999px;
    visibility: hidden;
}

/* ==========================================================================
   Mensagens de Feedback
   ========================================================================== */

.wsq-message {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

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

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

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

/* ==========================================================================
   Loading State
   ========================================================================== */

.wsq-loading {
    position: relative;
    pointer-events: none;
}

.wsq-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: wsq-spin 0.8s linear infinite;
}

@keyframes wsq-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Responsivo
   ========================================================================== */

@media screen and (max-width: 768px) {
    .wsq-phone-group {
        flex-direction: column;
    }

    .wsq-phone-group .wsq-country-select {
        width: 100%;
    }

    .wsq-quote-button {
        width: 100%;
        text-align: center;
    }
}