/* =================================================================
   Huru Lead Plugin - Frontend Styles v3.3
   ================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600;700&display=swap');

.huru-form-wrapper {
    max-width: 720px;
    margin: 2rem auto;
    font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.5;
}

/* ---- Grid layouts ---- */
.huru-grid-1 {
    display: block;
}

.huru-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
    align-items: start;
}

@media (max-width: 600px) {
    .huru-grid-2 {
        grid-template-columns: 1fr;
    }
}

.huru-grid-col {
    display: flex;
    flex-direction: column;
}

/* ---- Submit button row ---- */
.huru-submit-row {
    margin-top: 8px;
}

.huru-submit-row.huru-submit-full {
    text-align: left;
}
.huru-submit-row.huru-submit-left {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
}
.huru-submit-row.huru-submit-left .huru-submit {
    grid-column: 1;
}
.huru-submit-row.huru-submit-right {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
}
.huru-submit-row.huru-submit-right .huru-submit {
    grid-column: 2;
}

@media (max-width: 600px) {
    .huru-submit-row.huru-submit-left,
    .huru-submit-row.huru-submit-right {
        display: block;
    }
}

/* ---- Messages ---- */
.huru-messages {
    padding: 0;
    margin-bottom: 1rem;
    border-radius: 3px;
    font-size: 0.95rem;
    font-family: 'Instrument Sans', sans-serif;
    transition: all 0.3s ease;
}
.huru-messages:empty { display: none; }

.huru-msg-success {
    display: block;
    padding: 10px 14px;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.huru-msg-error {
    display: block;
    padding: 10px 14px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ---- Fields ---- */
.huru-field {
    margin-bottom: 1.1rem;
}

.huru-field label {
    display: block;
    margin-bottom: 4px;
    font-family: 'Instrument Sans', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
}

.huru-required { color: #c0392b; }

/* Uniform control styling */
.huru-field input[type="text"],
.huru-field input[type="email"],
.huru-field input[type="tel"],
.huru-field select,
.huru-field textarea {
    display: block;
    width: 100%;
    padding: 5px;
    font-family: 'Instrument Sans', sans-serif;
    font-size: 0.95rem;
    line-height: 1.5;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #fff;
    color: #222;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    height: 38px;
}

.huru-field textarea {
    height: auto;
    min-height: 38px;
    resize: vertical;
}

.huru-field select {
    appearance: auto;
    cursor: pointer;
}

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

.huru-field input::placeholder {
    font-family: 'Instrument Sans', sans-serif;
    color: #aaa;
}

/* Invalid */
.huru-field input.huru-invalid,
.huru-field select.huru-invalid,
.huru-field textarea.huru-invalid {
    border-color: #c0392b;
    box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.12);
}

.huru-error {
    display: none;
    margin-top: 3px;
    font-family: 'Instrument Sans', sans-serif;
    font-size: 0.8rem;
    color: #c0392b;
}

/* Honeypot */
.huru-hp {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

/* Submit button */
.huru-submit {
    display: inline-block;
    padding: 5px 20px;
    height: 38px;
    font-family: 'Instrument Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background: #2c3e50;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: opacity 0.2s ease, filter 0.2s ease;
}
.huru-submit:hover { filter: brightness(1.15); }
.huru-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading */
.huru-loading {
    opacity: 0.7;
    pointer-events: none;
}
