.ofint-form {
    display: grid;
    gap: 1rem;
}

.ofint-fields {
    display: grid;
    gap: 1rem;
}

.ofint-field {
    display: grid;
    gap: 0.4rem;
}

.ofint-field-error {
    display: block;
    min-height: 1.35rem;
    color: #b42318;
    font-size: 0.85rem;
    line-height: 1.45;
    opacity: 0;
    transition: opacity 120ms ease;
}

.ofint-field-error.ofint-states-error {
    opacity: 1;
}

.ofint-field-label,
.ofint-consent {
    color: inherit;
    font: inherit;
}

.ofint-field-input,
.ofint-submit,
.ofint-country-picker-button {
    font: inherit;
}

.ofint-field-input {
    width: 100%;
    min-height: 3rem;
    padding: 0.75rem 0.9rem;
}

.ofint-field.ofint-states-error .ofint-field-input,
.ofint-field.ofint-states-error .ofint-country-picker-button,
.ofint-consent.ofint-states-error {
    border-color: rgba(180, 35, 24, 0.75);
    box-shadow: 0 0 0 1px rgba(180, 35, 24, 0.22);
}

.ofint-phone {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    align-items: center;
    position: relative;
}

.ofint-country-picker-button {
    display: inline-grid;
    grid-template-columns: auto auto;
    gap: 0.6rem;
    align-items: center;
    min-height: 3rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid currentColor;
    background: transparent;
    cursor: pointer;
}

.ofint-country-picker-menu {
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 0;
    z-index: 20;
    display: grid;
    gap: 0.25rem;
    min-width: 15rem;
    padding: 0.35rem;
    border: 1px solid currentColor;
    background: #fff;
    color: #111;
}

.ofint-country-picker-option {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.5rem 0.65rem;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.ofint-country-picker-option:hover,
.ofint-country-picker-option:focus-visible {
    background: rgba(0, 0, 0, 0.08);
}

.ofint-country-picker-option.ofint-states-active {
    background: rgba(0, 0, 0, 0.08);
    font-weight: 600;
}

.ofint-country-picker-flag {
    display: inline-block;
    width: 1.5rem;
    height: 1rem;
    border-radius: 0.2rem;
    border: 1px solid rgba(17, 17, 17, 0.12);
    background-color: #e5e7eb;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    overflow: hidden;
    font-size: 0;
    line-height: 0;
    color: transparent;
    vertical-align: middle;
}

.ofint-country-picker-flag[data-country-iso="br"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'%3E%3Crect width='24' height='16' fill='%23009b3a'/%3E%3Cpath d='M12 2 20 8 12 14 4 8Z' fill='%23ffdf00'/%3E%3Ccircle cx='12' cy='8' r='3.1' fill='%23002776'/%3E%3C/svg%3E");
}

.ofint-country-picker-flag[data-country-iso="pt"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'%3E%3Crect width='9' height='16' fill='%2300602f'/%3E%3Crect x='9' width='15' height='16' fill='%23ff0000'/%3E%3Ccircle cx='9.6' cy='8' r='2.35' fill='%23ffcc29'/%3E%3C/svg%3E");
}

.ofint-country-picker-flag[data-country-iso="us"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'%3E%3Crect width='24' height='16' fill='%23fff'/%3E%3Cg fill='%23b22234'%3E%3Crect width='24' height='1.23' y='0'/%3E%3Crect width='24' height='1.23' y='2.46'/%3E%3Crect width='24' height='1.23' y='4.92'/%3E%3Crect width='24' height='1.23' y='7.38'/%3E%3Crect width='24' height='1.23' y='9.84'/%3E%3Crect width='24' height='1.23' y='12.3'/%3E%3Crect width='24' height='1.23' y='14.76'/%3E%3C/g%3E%3Crect width='10.4' height='8.62' fill='%233c3b6e'/%3E%3C/svg%3E");
}

.ofint-country-picker-flag[data-country-iso="ar"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'%3E%3Crect width='24' height='16' fill='%2374acdf'/%3E%3Crect y='5.33' width='24' height='5.34' fill='%23fff'/%3E%3Ccircle cx='12' cy='8' r='1.35' fill='%23f6b40e'/%3E%3C/svg%3E");
}

.ofint-country-picker-flag[data-country-iso="ca"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'%3E%3Crect width='24' height='16' fill='%23fff'/%3E%3Crect width='5' height='16' fill='%23d80621'/%3E%3Crect x='19' width='5' height='16' fill='%23d80621'/%3E%3Cpath d='M12 3.2 12.8 5l1.7-.5-1 1.5 1.6.9-1.8.4.4 1.8-1.7-1-.9 1.7-.9-1.7-1.7 1 .4-1.8-1.8-.4 1.6-.9-1-1.5 1.7.5Z' fill='%23d80621'/%3E%3C/svg%3E");
}

.ofint-country-picker-flag[data-country-iso="es"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'%3E%3Crect width='24' height='16' fill='%23aa151b'/%3E%3Crect y='4' width='24' height='8' fill='%23f1bf00'/%3E%3C/svg%3E");
}

.ofint-country-picker-flag[data-country-iso="gb"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'%3E%3Crect width='24' height='16' fill='%23012169'/%3E%3Cpath d='M0 0 24 16M24 0 0 16' stroke='%23fff' stroke-width='3.4'/%3E%3Cpath d='M0 0 24 16M24 0 0 16' stroke='%23c8102e' stroke-width='1.6'/%3E%3Cpath d='M12 0v16M0 8h24' stroke='%23fff' stroke-width='5'/%3E%3Cpath d='M12 0v16M0 8h24' stroke='%23c8102e' stroke-width='2.6'/%3E%3C/svg%3E");
}

.ofint-country-picker-flag[data-country-iso="il"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'%3E%3Crect width='24' height='16' fill='%23fff'/%3E%3Crect y='2' width='24' height='2' fill='%230034b5'/%3E%3Crect y='12' width='24' height='2' fill='%230034b5'/%3E%3Cpath d='m12 5.1 2.45 4.2H9.55Zm0 5.8-2.45-4.2h4.9Z' fill='none' stroke='%230034b5' stroke-width='0.85'/%3E%3C/svg%3E");
}

.ofint-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.ofint-consent {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.ofint-submit {
    min-height: 3rem;
    border: 0;
    cursor: pointer;
}

.ofint-secondary-button {
    min-height: 2.75rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid currentColor;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.ofint-preview-registered {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid currentColor;
}

.ofint-preview-registered-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.ofint-download-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
}

.ofint-message {
    padding: 0.85rem 1rem;
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.04);
    color: inherit;
    font-size: 0.92rem;
    line-height: 1.6;
}

.ofint-message.ofint-states-error {
    background: rgba(180, 35, 24, 0.12);
    color: #b42318;
}

.ofint-message.ofint-states-success {
    background: rgba(28, 123, 84, 0.12);
    color: #1c7b54;
}

.ofint-states-disabled {
    opacity: 0.75;
}

.ofint-states-disabled .ofint-fields,
.ofint-states-disabled .ofint-consent,
.ofint-states-disabled .ofint-submit {
    pointer-events: none;
}

.ofint-message:empty {
    display: none;
}

.ofint-phone-grid {
    display: grid;
    grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr);
    gap: 1rem;
}

.ofint-country-picker {
    position: relative;
}

.ofint-form-subsection {
    display: grid;
    gap: 0.65rem;
    padding: 1rem;
    border: 1px solid currentColor;
    border-radius: 0.9rem;
}

.ofint-form-subsection-title {
    margin: 0;
    font-weight: 700;
}

.ofint-consent-optional {
    margin: 0;
}

.ofint-consent-input {
    flex: 0 0 auto;
    margin-top: 0.2rem;
}

.ofint-states-valid {
    border-color: rgba(28, 123, 84, 0.75);
    box-shadow: 0 0 0 1px rgba(28, 123, 84, 0.22);
}

@media (max-width: 640px) {
    .ofint-phone-grid {
        grid-template-columns: 1fr;
    }
}
