/* ─── B2B Contact Form – agcontactform ─── */
/* Matches Agrimontana B2B site design: Lora/Lato, #43242a, #d3a183 */

.agcontactform-wrapper {
    max-width: 800px;
    margin: 30px auto;
    padding: 0 15px;
    font-family: "Lato", sans-serif;
    color: #333;
    line-height: 1.6;
}

/* ── Success ── */
.agcontactform-success {
    text-align: center;
    padding: 50px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.agcontactform-success .material-icons {
    font-size: 56px;
    color: #27ae60;
    display: block;
    margin-bottom: 12px;
}

.agcontactform-success p {
    font-size: 15px;
    color: #555;
}

/* ── Error ── */
.agcontactform-error {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 4px;
    margin-bottom: 20px;
    background: #fdecea;
    color: #c0392b;
    border: 1px solid #f5c6cb;
    font-size: 14px;
}

/* ── Container ── */
.agcontactform-container {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
}

/* ── Header ── */
.agcontactform-header {
    background: #43242a;
    color: #fff;
    padding: 28px 30px;
    text-align: center;
}

.agcontactform-header h2 {
    margin: 0 0 6px;
    font-family: "Lora", Georgia, serif;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.agcontactform-subtitle {
    margin: 0;
    font-size: 14px;
    color: #d3a183;
    font-family: "Lato", sans-serif;
}

/* ── Form ── */
.agcontactform-form {
    padding: 28px 30px 32px;
}

/* ── Sections ── */
.agcontactform-section {
    border: 1px solid #e8e0dc;
    border-radius: 4px;
    padding: 22px 20px 18px;
    margin-bottom: 22px;
    background: #faf8f6;
}

.agcontactform-section legend {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: "Lora", Georgia, serif;
    font-size: 16px;
    font-weight: 600;
    color: #43242a;
    padding: 0 8px;
    width: auto;
    border: none;
    margin-bottom: 2px;
}

.agcontactform-section legend .material-icons {
    font-size: 20px;
    color: #d3a183;
}

/* ── Rows & Fields ── */
.agcontactform-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 14px;
}

.agcontactform-row:last-child {
    margin-bottom: 0;
}

.agcontactform-field {
    display: flex;
    flex-direction: column;
}

.agcontactform-full {
    flex: 1 1 100%;
}

.agcontactform-half {
    flex: 1 1 calc(50% - 8px);
    min-width: 200px;
}

.agcontactform-third {
    flex: 1 1 calc(33.33% - 11px);
    min-width: 160px;
}

.agcontactform-field label {
    font-family: "Lato", sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.agcontactform-field label .required {
    color: #c0392b;
    font-weight: 700;
}

.agcontactform-field input[type="text"],
.agcontactform-field input[type="email"],
.agcontactform-field input[type="tel"],
.agcontactform-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0cac6;
    border-radius: 3px;
    font-size: 14px;
    font-family: "Lato", sans-serif;
    color: #333;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.agcontactform-field input:focus,
.agcontactform-field textarea:focus {
    outline: none;
    border-color: #d3a183;
    box-shadow: 0 0 0 3px rgba(211, 161, 131, 0.15);
    background: #fff;
}

.agcontactform-field textarea {
    resize: vertical;
    min-height: 120px;
}

/* ── Select dropdown ── */
.agcontactform-field select,
.agcontactform-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0cac6;
    border-radius: 3px;
    font-size: 14px;
    font-family: "Lato", sans-serif;
    color: #333;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23555' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px;
    padding-right: 32px;
    cursor: pointer;
}

.agcontactform-field select:focus,
.agcontactform-select:focus {
    outline: none;
    border-color: #d3a183;
    box-shadow: 0 0 0 3px rgba(211, 161, 131, 0.15);
    background-color: #fff;
}

/* ── Marketing consent ── */
.agcontactform-marketing {
    margin-top: 10px;
    background: #f5f2ef;
    border: 1px solid #e0d9d3;
}

.agcontactform-marketing label {
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    cursor: pointer;
}

/* ── Privacy checkbox ── */
.agcontactform-privacy {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 20px 0 8px;
    padding: 14px 16px;
    background: #faf8f6;
    border: 1px solid #e8e0dc;
    border-radius: 4px;
}

.agcontactform-privacy input[type="checkbox"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    accent-color: #43242a;
    flex-shrink: 0;
    cursor: pointer;
}

.agcontactform-privacy label {
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    cursor: pointer;
}

.agcontactform-privacy label a {
    color: #d3a183;
    text-decoration: underline;
}

.agcontactform-privacy label a:hover {
    color: #c08a6a;
}

.agcontactform-privacy label .required {
    color: #c0392b;
    font-weight: 700;
}

.agcontactform-privacy.has-error {
    border-color: #c0392b;
    background: #fdecea;
}

/* ── Required note ── */
.agcontactform-required-note {
    font-size: 12px;
    color: #999;
    margin-bottom: 16px;
}

.agcontactform-required-note .required {
    color: #c0392b;
    font-weight: 700;
}

/* ── Submit ── */
.agcontactform-submit {
    text-align: center;
}

.agcontactform-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 38px;
    font-family: "Lato", sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #43242a;
    color: #fff;
    border: 2px solid #43242a;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.agcontactform-btn:hover {
    background: #d3a183;
    border-color: #d3a183;
    color: #fff;
}

.agcontactform-btn .material-icons {
    font-size: 18px;
}

.agcontactform-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .agcontactform-row {
        flex-direction: column;
        gap: 10px;
    }

    .agcontactform-half,
    .agcontactform-third {
        flex: 1 1 100%;
        min-width: 100%;
    }

    .agcontactform-form {
        padding: 18px 15px;
    }

    .agcontactform-header {
        padding: 22px 15px;
    }

    .agcontactform-section {
        padding: 16px 14px;
    }

    .agcontactform-header h2 {
        font-size: 20px;
    }
}
