/* CSS para o formulário de Lista de Espera - Frontend */

.lista-espera-container {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
    font-family: inherit;
}

.lista-espera-form-wrapper h3 {
    margin-top: 0;
    color: #3ACBC6;
    font-size: 1.2em;
    font-weight: 600;
}

.lista-espera-form-wrapper p {
    margin-bottom: 15px;
    color: #666;
    font-size: 0.95em;
}

.lista-espera-fields {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.lista-espera-field {
    display: flex;
    flex-direction: column;
}

.lista-espera-field label {
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
    font-size: 0.9em;
}

.lista-espera-field input {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
}

.lista-espera-field input:focus {
    outline: none;
    border-color: #3ACBC6;
    box-shadow: 0 0 0 2px rgba(58, 203, 198, 0.2);
}

.lista-espera-field input:invalid {
    border-color: #e74c3c;
}

.lista-espera-button {
    background: linear-gradient(135deg, #3ACBC6, #2BA8A3);
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 280px;
    box-shadow: 0 2px 4px rgba(58, 203, 198, 0.3);
}

.lista-espera-button:hover {
    background: linear-gradient(135deg, #2BA8A3, #239A96);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(58, 203, 198, 0.4);
}

.lista-espera-button:focus {
    outline: 2px solid #3ACBC6;
    outline-offset: 2px;
}

.lista-espera-button:active {
    transform: translateY(0);
}

.lista-espera-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

.lista-espera-messages {
    margin-top: 15px;
    padding: 0;
}

.lista-espera-message {
    padding: 10px 12px;
    border-radius: 4px;
    margin: 5px 0;
    font-size: 0.9em;
}

.lista-espera-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.lista-espera-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Loading state */
.lista-espera-form.loading .lista-espera-button {
    position: relative;
    color: transparent;
}

.lista-espera-form.loading .lista-espera-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsividade */
@media (min-width: 600px) {
    .lista-espera-fields {
        grid-template-columns: 1fr 1fr;
        gap: 15px 20px;
    }
    
    .lista-espera-field:nth-child(3) {
        grid-column: 1 / -1;
    }
    
    .lista-espera-button {
        width: auto;
        max-width: none;
    }
}

/* Integração com temas populares */
.woocommerce .lista-espera-container,
.wc-block-grid .lista-espera-container {
    margin: 20px 0;
}

/* Astra theme compatibility */
.ast-woocommerce-container .lista-espera-container {
    background-color: #fff;
    border-color: #e1e1e1;
}

/* Storefront theme compatibility */
.storefront .lista-espera-container {
    font-family: "Source Sans Pro", "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
}

/* OceanWP theme compatibility */
.oceanwp .lista-espera-container {
    background-color: #fff;
}

/* Avada theme compatibility */
.avada-version .lista-espera-container {
    background-color: rgba(255, 255, 255, 0.95);
}

/* Modo escuro */
@media (prefers-color-scheme: dark) {
    .lista-espera-container {
        background-color: #2c2c2c;
        border-color: #3ACBC6;
        color: #fff;
    }
    
    .lista-espera-field input {
        background-color: #ffffff;
        border-color: #555;
        color: #000000;
    }
    
    .lista-espera-field input::placeholder {
        color: #666666;
    }
    
    .lista-espera-field input:focus {
        border-color: #3ACBC6;
        box-shadow: 0 0 0 2px rgba(58, 203, 198, 0.3);
    }
    
    .lista-espera-form-wrapper p {
        color: #cccccc;
    }
    
    .lista-espera-form-wrapper h3 {
        color: #3ACBC6;
    }
    
    .lista-espera-field label {
        color: #ffffff;
    }
    
    .lista-espera-message.success {
        background-color: #1e4d3a;
        color: #4ade80;
        border-color: #4ade80;
    }
    
    .lista-espera-message.error {
        background-color: #4a1e1e;
        color: #f87171;
        border-color: #f87171;
    }
}
