/**
 * Estilos para o template simples do Lead Capture Plugin
 * Layout minimalista com campos lado a lado
 */

/* Reset e base para template simples */
.lead-capture-simple-wrapper * {
    box-sizing: border-box;
}

.lead-capture-simple-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    position: relative;
}

/* Header simples */
.lead-simple-header {
    margin-bottom: 20px;
    text-align: center;
}

.lead-simple-title {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
    color: white;
}

/* Mensagens de status simples */
.lead-simple-messages {
    margin: 0 0 15px 0;
}

.lead-simple-message {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    border-radius: 6px;
    margin: 0 0 10px 0;
    font-size: 14px;
}

.lead-simple-message.lead-simple-success {
    background-color: rgba(40, 167, 69, 0.15);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.4);
}

.lead-simple-message.lead-simple-error {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.simple-message-icon {
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
}

.simple-message-text {
    flex: 1;
    line-height: 1.4;
}

/* Formulário simples */
.lead-simple-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Linhas do formulário */
.lead-simple-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    border: solid 0px red;
}

.lead-simple-field {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

/* Labels simples */
.lead-simple-label {
    font-size: 14px;
    font-weight: 500;
    color: white;
    margin: 0;
}

.simple-required {
    color: white;
    font-weight: bold;
    margin-left: 2px;
}

/* Inputs simples */
.lead-simple-input {
    padding: 12px 15px;
    border: 2px solid white;
    border-radius: 4px;
    background-color: transparent;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.lead-simple-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.lead-simple-input:focus {
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.lead-simple-input:hover:not(:focus) {
    border-color: rgba(255, 255, 255, 0.9);
}

.lead-simple-input.simple-error {
    border-color: white;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

/* Mensagens de erro dos campos */
.lead-simple-error {
    color: white !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    min-height: 8px;
    margin-top: 1px !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8) !important;
    display: block !important;
}

/* Campo honeypot (mantém invisível) */
.lead-honeypot {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

/* Footer com consentimento e botão */
.lead-simple-footer {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: center;
    margin-top: 10px;
}

.lead-simple-consent {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Checkbox customizado */
.lead-simple-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: white;
    font-size: 14px;
}

.lead-simple-checkbox input[type="checkbox"] {
    display: none;
}

.simple-checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid white;
    border-radius: 3px;
    background-color: transparent;
    position: relative;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.simple-checkmark::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lead-simple-checkbox input[type="checkbox"]:checked + .simple-checkmark {
    background-color: white;
    border-color: white;
}

.lead-simple-checkbox input[type="checkbox"]:checked + .simple-checkmark::after {
    opacity: 1;
    border-color: #333;
}

.simple-consent-text {
    line-height: 1.4;
}

/* Botão de envio simples */
.lead-simple-submit {
    display: flex;
    justify-content: flex-end;
}

.lead-simple-btn {
    background-color: white;
    color: black;
    border: 2px solid white;
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lead-simple-btn:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.lead-simple-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.lead-simple-btn.simple-loading {
    pointer-events: none;
}

.simple-btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.simple-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    border-top-color: black;
    animation: simple-spin 1s linear infinite;
}

@keyframes simple-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsividade para mobile */
@media (max-width: 768px) {
    .lead-capture-simple-wrapper {
        margin: 0 10px;
    }
    
    .lead-simple-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .lead-simple-footer {
        grid-template-columns: 1fr;
        gap: 15px;
        text-align: center;
    }
    
    .lead-simple-submit {
        justify-content: center;
    }
    
    .lead-simple-btn {
        width: 100%;
        padding: 15px 20px;
    }
    
    .lead-simple-input {
        font-size: 16px; /* Previne zoom no iOS */
    }
    
    .lead-simple-title {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .lead-capture-simple-wrapper {
        margin: 0 5px;
    }
    
    .lead-simple-row {
        gap: 12px;
    }
    
    .lead-simple-form {
        gap: 15px;
    }
    
    .lead-simple-input {
        padding: 10px 12px;
        font-size: 15px;
    }
    
    .lead-simple-btn {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .lead-simple-title {
        font-size: 18px;
    }
    
    .lead-simple-checkbox {
        font-size: 13px;
    }
}

/* Animações de entrada suaves */
@keyframes simple-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lead-capture-simple-wrapper {
    animation: simple-fadeIn 0.5s ease-out;
}

/* Estados de focus para acessibilidade */
.lead-simple-input:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

.lead-simple-btn:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
}

.lead-simple-checkbox:focus-within .simple-checkmark {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

/* Prevenção de zoom em dispositivos móveis */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .lead-simple-input {
        font-size: 16px;
    }
}

/* Estados de validação visual */
.lead-simple-input.valid {
    border-color: rgba(40, 167, 69, 0.8);
}

.lead-simple-input.valid:focus {
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.3);
}

/* Melhorias para contraste e legibilidade */
.lead-simple-label {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.simple-consent-text {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Loading overlay para formulário simples */
.lead-capture-simple-wrapper.submitting {
    pointer-events: none;
    position: relative;
}

.lead-capture-simple-wrapper.submitting::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1000;
    border-radius: 4px;
}

/* Suporte para temas escuros (mantém as cores brancas) */
@media (prefers-color-scheme: dark) {
    .lead-capture-simple-wrapper {
        /* Mantém os estilos originais mesmo em dark mode */
    }
}

/* Acessibilidade - movimento reduzido */
@media (prefers-reduced-motion: reduce) {
    .lead-capture-simple-wrapper,
    .lead-simple-input,
    .lead-simple-btn,
    .simple-checkmark,
    .simple-spinner {
        animation: none;
        transition: none;
    }
}

/* Integração com WordPress */
.entry-content .lead-capture-simple-wrapper,
.widget .lead-capture-simple-wrapper {
    margin: 20px auto;
}

/* Override para garantir que estilos do tema não interfiram */
.lead-capture-simple-wrapper input,
.lead-capture-simple-wrapper button,
.lead-capture-simple-wrapper label {
    font-family: inherit;
    line-height: normal;
}

.lead-capture-simple-wrapper button {
    border-style: solid;
    text-decoration: none;
}