/*
 * TWFG InsuredMine Home & Auto Fact Finder front-end styles.
 * Kept readable on purpose for maintenance and audits.
 */


/*
 * The wrapper also receives a per-product class such as .twfg-imaf-auto,
 * .twfg-imaf-boat, or .twfg-imaf-landlord. Those classes are intentionally
 * available for future product-specific styling even when no special rule is
 * currently needed.
 */

.twfg-imaf-wrap {
    max-width:1100px;
    margin:28px auto;
    padding:28px;
    border:1px solid #e5e7eb;
    border-radius:18px;
    background:#fff;
    box-shadow:0 10px 30px rgba(0,0,0,.06);
}
.twfg-imaf-wrap,.twfg-imaf-wrap * {
    box-sizing:border-box;
}
.twfg-imaf-wrap h2,.twfg-imaf-wrap h3,.twfg-imaf-wrap h4 {
    color:#3F6C7D;
    line-height:1.2;
}
.twfg-imaf-wrap h2 {
    margin-top:0;
    font-size:clamp(26px,4vw,38px);
}
.twfg-imaf-wrap h3 {
    font-size:clamp(20px,3vw,26px);
}
.twfg-imaf-wrap h4 {
    font-size:18px;
    margin-bottom:12px;
}
.twfg-imaf-intro {
    color:#4B4F54;
    margin-bottom:22px;
    font-size:17px;
}
.twfg-imaf-section {
    border-top:1px solid #e5e7eb;
    padding-top:22px;
    margin-top:22px;
    scroll-margin-top:20px;
}
.twfg-imaf-grid {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:16px 18px;
}
.twfg-imaf-form label {
    display:flex;
    flex-direction:column;
    gap:7px;
    font-weight:700;
    color:#333;
    min-width:0;
}
.twfg-imaf-form label span {
    color:#D66965;
}
.twfg-imaf-form input,.twfg-imaf-form select,.twfg-imaf-form textarea {
    width:100%;
    min-height:46px;
    box-sizing:border-box;
    border:1px solid #cfd8dc;
    border-radius:10px;
    padding:11px 12px;
    font-size:16px;
    line-height:1.35;
    background:#fff;
}
.twfg-imaf-form textarea {
    min-height:120px;
    resize:vertical;
}
.twfg-imaf-form input:focus,.twfg-imaf-form select:focus,.twfg-imaf-form textarea:focus {
    outline:none;
    border-color:#3F6C7D;
    box-shadow:0 0 0 3px rgba(63,108,125,.16);
}
.twfg-imaf-checkrow {
    display:flex;
    flex-wrap:wrap;
    gap:14px 20px;
}
.twfg-imaf-checkrow label,.twfg-imaf-consent {
    display:flex!important;
    flex-direction:row!important;
    align-items:flex-start;
    font-weight:600!important;
    line-height:1.45;
}
.twfg-imaf-checkrow input,.twfg-imaf-consent input {
    width:auto;
    min-height:auto;
    margin-top:4px;
    flex:0 0 auto;
}
.twfg-imaf-full {
    margin-top:18px;
}
.twfg-imaf-consent {
    margin:18px 0;
    background:#f8fafc;
    border:1px solid #e5e7eb;
    border-radius:12px;
    padding:14px;
}
.twfg-imaf-form button {
    background:#3F6C7D;
    color:#fff;
    border:none;
    border-radius:999px;
    padding:13px 24px;
    font-size:17px;
    font-weight:800;
    cursor:pointer;
    min-height:48px;
}
.twfg-imaf-form button:hover,.twfg-imaf-form button:focus {
    background:#58A7AF;
}
.twfg-imaf-submit {
    width:auto;
    min-width:240px;
}
.twfg-imaf-notice {
    padding:12px 14px;
    border-radius:10px;
    margin-bottom:18px;
    font-weight:700;
}
.twfg-imaf-success {
    background:#eaf7f1;
    border:1px solid #9fd5bd;
    color:#135b3d;
}
.twfg-imaf-error {
    background:#fdeeee;
    border:1px solid #f2b8b5;
    color:#8a1f18;
}
.twfg-imaf-hp {
    position:absolute!important;
    left:-9999px!important;
    opacity:0!important;
}
.twfg-imaf-small {
    font-size:14px;
    color:#4B4F54;
    background:#f8fafc;
    padding:10px 12px;
    border-radius:10px;
    line-height:1.45;
}

.twfg-imaf-field-note {
    font-size:13px;
    color:#4B4F54;
    margin:4px 0 0;
    line-height:1.4;
}

.twfg-imaf-repeat {
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    padding-bottom:4px;
}
.twfg-imaf-repeat-head,.twfg-imaf-repeat-row {
    display:grid;
    gap:8px;
    min-width:900px;
    margin-bottom:8px;
}
.twfg-imaf-driver-head,.twfg-imaf-driver-row {
    grid-template-columns:1.5fr 1fr 1.4fr .8fr .9fr .7fr .7fr .9fr;
}
.twfg-imaf-vehicle-head,.twfg-imaf-vehicle-row {
    grid-template-columns:.7fr 1fr 1fr 1.3fr 1.6fr .8fr 1fr .7fr .7fr;
}
.twfg-imaf-repeat-head {
    font-weight:800;
    color:#4B4F54;
    font-size:13px;
}
.twfg-imaf-repeat-row label {
    gap:0;
}
.twfg-imaf-repeat-row label span {
    display:none;
}
.twfg-imaf-add {
    margin:8px 0 12px 0!important;
    background:#58A7AF!important;
    padding:9px 16px!important;
    font-size:14px!important;
}
.twfg-imaf-yesno {
    grid-template-columns:repeat(3,minmax(0,1fr));
}
.twfg-imaf-contact-section {
    margin-top:24px;
}
.twfg-imaf-contact-options {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:12px;
    margin-top:12px;
}
.twfg-imaf-contact-options label {
    border:1px solid #d9e2e5;
    border-radius:12px;
    padding:14px 16px;
    background:#fff;
    cursor:pointer;
    font-weight:800;
    display:flex!important;
    flex-direction:row!important;
    align-items:center;
    gap:10px;
    min-height:56px;
}
.twfg-imaf-contact-options input[type="radio"] {
    width:auto;
    min-height:auto;
    margin:0;
}
.twfg-imaf-contact-options label:has(input:checked),.twfg-imaf-contact-options label.is-checked {
    border-color:#3F6C7D;
    box-shadow:0 0 0 2px rgba(63,108,125,.12);
    background:#f4fafb;
}
@media(max-width:900px) {
    .twfg-imaf-wrap {
        margin:18px 10px;
        padding:22px;
    }
    .twfg-imaf-grid,.twfg-imaf-yesno {
        grid-template-columns:1fr;
    }
    .twfg-imaf-contact-options {
        grid-template-columns:1fr;
    }
}
@media(max-width:720px) {
    .twfg-imaf-wrap {
        margin:0;
        padding:16px;
        border-radius:0;
        border-left:none;
        border-right:none;
        box-shadow:none;
    }
    .twfg-imaf-intro {
        font-size:15px;
    }
    .twfg-imaf-section {
        padding-top:18px;
        margin-top:18px;
    }
    .twfg-imaf-form input,.twfg-imaf-form select,.twfg-imaf-form textarea {
        min-height:50px;
        font-size:16px;
        padding:12px;
    }
    .twfg-imaf-checkrow {
        display:grid;
        grid-template-columns:1fr;
        gap:10px;
    }
    .twfg-imaf-checkrow label {
        margin-bottom:0;
        border:1px solid #e5e7eb;
        border-radius:12px;
        padding:12px;
        background:#fff;
    }
    .twfg-imaf-repeat {
        overflow:visible;
        padding-bottom:0;
    }
    .twfg-imaf-repeat-head {
        display:none;
    }
    .twfg-imaf-repeat-row {
        min-width:0;
        grid-template-columns:1fr;
        gap:12px;
        padding:14px;
        margin:0 0 14px 0;
        border:1px solid #e5e7eb;
        border-radius:14px;
        background:#fbfdfe;
    }
    .twfg-imaf-repeat-row label {
        display:flex;
        flex-direction:column;
        gap:7px;
        font-size:14px;
        color:#333;
        font-weight:800;
    }
    .twfg-imaf-repeat-row label span {
        display:block;
        color:#333;
    }
    .twfg-imaf-add {
        width:100%;
        border-radius:12px!important;
        min-height:50px!important;
        font-size:16px!important;
        margin:6px 0 18px 0!important;
    }
    .twfg-imaf-contact-options label {
        min-height:58px;
        padding:15px;
    }
    .twfg-imaf-consent {
        font-size:14px;
    }
    .twfg-imaf-submit {
        width:100%;
        min-width:0;
        border-radius:12px!important;
        min-height:54px!important;
        margin-top:16px;
    }
}
@media(max-width:420px) {
    .twfg-imaf-wrap {
        padding:14px;
    }
    .twfg-imaf-wrap h2 {
        font-size:25px;
    }
    .twfg-imaf-form label {
        font-size:14px;
    }
    .twfg-imaf-small {
        font-size:13px;
    }
}
