/* =========================================================
   My Green Home — ajánlatkérő űrlap
   A stílus a főoldal wireframe-jének modálját követi.
   ========================================================= */

.mgh-ak-modal {
    --mgh-forest: #0e2a21;
    --mgh-signal: #3e8e6a;
    --mgh-line: #e2dfd8;
    --mgh-bone: #f4f2ed;
    --mgh-ink: #1a1f1d;
    --mgh-muted: #8a8f8c;

    position: fixed;
    inset: 0;
    z-index: 100000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(12, 15, 14, 0.62);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.2, 0.6, 0.2, 1), visibility 0.3s;
}

.mgh-ak-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.mgh-ak-bd {
    position: relative;
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    background: #fff;
    border-left: 6px solid var(--mgh-signal);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.55);
    transform: translateY(16px);
    transition: transform 0.35s cubic-bezier(0.2, 0.6, 0.2, 1);
    font-family: "Roboto", "Segoe UI", system-ui, sans-serif;
}

.mgh-ak-modal.is-open .mgh-ak-bd {
    transform: none;
}

.mgh-ak-x {
    position: absolute;
    top: 16px;
    right: 18px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 1px solid var(--mgh-line);
    border-radius: 50%;
    background: var(--mgh-bone);
    color: var(--mgh-ink);
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    transition: 0.22s;
}

.mgh-ak-x span {
    display: block;
    margin-top: -3px;
}

.mgh-ak-x:hover,
.mgh-ak-x:focus-visible {
    background: var(--mgh-forest);
    border-color: var(--mgh-forest);
    color: #fff;
}

/* --- fejléc (a korábbi sötét oldalsáv helyett) --- */

.mgh-ak-head {
    margin-bottom: 26px;
    padding-right: 56px;
}

.mgh-ak-head h3 {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--mgh-ink);
}

.mgh-ak-head p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #5d6664;
}

/* --- apróbetűs zárósor --- */

.mgh-ak-fine {
    margin: 18px 0 0;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--mgh-muted);
}

/* --- jobb oldal: az űrlap --- */

.mgh-ak-r {
    padding: 36px 40px 40px;
    overflow: auto;
    min-height: 0;
    position: relative;
}

.mgh-ak-inline {
    max-width: 720px;
    margin: 0 auto;
    font-family: "Roboto", "Segoe UI", system-ui, sans-serif;
    --mgh-forest: #0e2a21;
    --mgh-signal: #3e8e6a;
    --mgh-line: #e2dfd8;
    --mgh-bone: #f4f2ed;
    --mgh-ink: #1a1f1d;
    --mgh-muted: #8a8f8c;
}

.mgh-ak-inline-title {
    margin: 0 0 24px;
    font-size: 28px;
    font-weight: 300;
    color: var(--mgh-ink);
}

.mgh-ak-prog {
    height: 2px;
    background: var(--mgh-line);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 12px;
}

.mgh-ak-pb {
    display: block;
    height: 100%;
    width: 50%;
    background: var(--mgh-signal);
    transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.mgh-ak-pstep {
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--mgh-muted);
    margin-bottom: 26px;
}

.mgh-ak-step {
    display: none;
}

.mgh-ak-step.is-on {
    display: block;
    animation: mgh-ak-fade 0.4s cubic-bezier(0.2, 0.6, 0.2, 1);
}

@keyframes mgh-ak-fade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.mgh-ak-note {
    margin: 0 0 22px;
    padding: 13px 16px;
    background: #f3f7f5;
    border-radius: 8px;
    font-size: 13.5px;
    line-height: 1.6;
    color: #3e4644;
}

/* --- mezők --- */

.mgh-ak-field {
    margin-bottom: 20px;
}

.mgh-ak-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

.mgh-ak-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #3e4644;
    margin-bottom: 8px;
}

.mgh-ak-label i {
    font-style: normal;
    color: #c0392b;
}

.mgh-ak-field input[type="text"],
.mgh-ak-field input[type="email"],
.mgh-ak-field input[type="tel"],
.mgh-ak-field select,
.mgh-ak-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d3d6d1;
    border-radius: 6px;
    background: #fff;
    font-family: inherit;
    font-size: 14.5px;
    color: var(--mgh-ink);
    transition: border-color 0.22s, box-shadow 0.22s;
    box-sizing: border-box;
}

.mgh-ak-field textarea {
    resize: vertical;
    min-height: 84px;
}

.mgh-ak-field input:focus,
.mgh-ak-field select:focus,
.mgh-ak-field textarea:focus {
    outline: none;
    border-color: var(--mgh-forest);
    box-shadow: 0 0 0 3px rgba(14, 42, 33, 0.09);
}

.mgh-ak-field.has-error input,
.mgh-ak-field.has-error select,
.mgh-ak-field.has-error textarea,
.mgh-ak-field.has-error .mgh-ak-opts {
    border-color: #c0392b;
}

.mgh-ak-msg {
    display: none;
    font-size: 12.5px;
    color: #c0392b;
    margin-top: 6px;
}

.mgh-ak-field.has-error .mgh-ak-msg {
    display: block;
}

.mgh-ak-hint {
    display: block;
    font-size: 12.5px;
    color: var(--mgh-muted);
    margin-top: 7px;
    line-height: 1.5;
}

/* --- rádiógombok --- */

.mgh-ak-opts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 6px;
}

.mgh-ak-opt {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid #d3d6d1;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.3;
    color: var(--mgh-ink);
    cursor: pointer;
    transition: 0.22s;
}

.mgh-ak-opt:hover {
    border-color: #a9aea8;
}

.mgh-ak-opt input {
    width: 15px;
    height: 15px;
    margin: 0;
    padding: 0;
    border: 0;
    flex: 0 0 auto;
    accent-color: var(--mgh-forest);
}

.mgh-ak-opt:has(input:checked) {
    border-color: var(--mgh-forest);
    background: #f3f7f5;
    box-shadow: inset 0 0 0 1px var(--mgh-forest);
}

/* --- jelölőnégyzet --- */

.mgh-ak-check {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 13.5px;
    line-height: 1.5;
    color: #5d6664;
    cursor: pointer;
}

.mgh-ak-check input {
    margin-top: 3px;
    flex: 0 0 auto;
    accent-color: var(--mgh-forest);
}

.mgh-ak-check i {
    font-style: normal;
    color: #c0392b;
}

.mgh-ak-check.has-error span {
    color: #c0392b;
}

/* --- fájlfeltöltés --- */

.mgh-ak-drop {
    position: relative;
    display: block;
    padding: 24px 20px;
    border: 1px dashed #c6cbc5;
    border-radius: 8px;
    background: #fbfbf9;
    text-align: center;
    font-size: 14px;
    color: #5d6664;
    cursor: pointer;
    transition: 0.22s;
}

.mgh-ak-drop:hover,
.mgh-ak-drop.is-over {
    border-color: var(--mgh-forest);
    background: #f8faf9;
}

.mgh-ak-drop b {
    color: var(--mgh-forest);
}

.mgh-ak-drop-sub {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.6;
    color: #9ca19e;
}

.mgh-ak-file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.mgh-ak-filelist {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    font-size: 13px;
    color: #5d6664;
}

.mgh-ak-filelist li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 10px;
    border: 1px solid var(--mgh-line);
    border-radius: 6px;
    margin-bottom: 6px;
    background: #fff;
}

.mgh-ak-filelist span {
    color: var(--mgh-muted);
    flex: 0 0 auto;
}

/* --- rejtett csapda --- */

.mgh-ak-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* --- captcha --- */

.mgh-ak-captcha {
    margin: 4px 0 16px;
}

/* --- hibaüzenet --- */

.mgh-ak-error {
    margin: 16px 0 0;
    padding: 12px 16px;
    border-radius: 8px;
    background: #fdf1ef;
    border-left: 3px solid #c0392b;
    font-size: 13.5px;
    line-height: 1.55;
    color: #8c2c20;
}

/* --- navigáció --- */

.mgh-ak-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--mgh-line);
    flex-wrap: wrap;
}

.mgh-ak-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 22px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    transition: 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}

.mgh-ak-btn.is-primary {
    background: var(--mgh-forest);
    color: #fff;
    margin-left: auto;
}

.mgh-ak-btn.is-primary:hover {
    background: #17402f;
}

.mgh-ak-btn.is-ghost {
    background: #fff;
    border-color: #d3d6d1;
    color: var(--mgh-ink);
}

.mgh-ak-btn.is-ghost:hover {
    border-color: #a9aea8;
}

.mgh-ak-btn.is-text {
    background: transparent;
    color: var(--mgh-forest);
    text-decoration: underline;
    text-underline-offset: 3px;
    padding-left: 6px;
    padding-right: 6px;
}

.mgh-ak-btn.is-text:hover {
    color: var(--mgh-signal);
}

.mgh-ak-btn[disabled] {
    opacity: 0.55;
    cursor: default;
}

/*
 * A böngésző saját [hidden] { display: none } szabályát a fenti
 * .mgh-ak-btn { display: inline-flex } felülírja, ezért a „Vissza" gomb
 * az 1. lépésnél is látszott — hiába állítja a JS a hidden attribútumot.
 * A gomb csak a 2. lépéstől jelenik meg.
 */
.mgh-ak-btn[hidden] {
    display: none !important;
}

/* --- köszönőképernyő --- */

.mgh-ak-done {
    text-align: center;
    padding: 30px 0 10px;
    animation: mgh-ak-fade 0.4s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.mgh-ak-done-i {
    width: 62px;
    height: 62px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: #eaf2ed;
    color: var(--mgh-signal);
    font-size: 30px;
    line-height: 62px;
}

.mgh-ak-done h3 {
    margin: 0 0 12px;
    font-size: 23px;
    font-weight: 500;
    color: var(--mgh-ink);
}

.mgh-ak-done p {
    max-width: 44ch;
    margin: 0 auto 24px;
    font-size: 15px;
    line-height: 1.65;
    color: #5d6664;
}

/* --- mobil --- */

@media (max-width: 860px) {
    .mgh-ak-bd {
        max-height: 94vh;
        border-left-width: 4px;
    }

    .mgh-ak-r {
        padding: 30px 22px 34px;
    }

    .mgh-ak-head {
        padding-right: 50px;
    }

    .mgh-ak-head h3 {
        font-size: 22px;
    }

    .mgh-ak-row {
        grid-template-columns: 1fr;
    }

    .mgh-ak-nav {
        gap: 10px;
    }

    .mgh-ak-btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .mgh-ak-btn.is-primary {
        margin-left: 0;
    }
}

/* =========================================================
   VÉDELEM A TÉMA ÉS AZ ELEMENTOR STÍLUSAI ELLEN
   Az űrlap bárhol megjelenhet, ezért a kritikus tulajdonságokat
   nagyobb súllyal is rögzítjük.
   ========================================================= */

.mgh-ak-modal .mgh-ak-x,
.mgh-ak-inline .mgh-ak-x {
    outline: 0 !important;
    box-shadow: none !important;
    border: 1px solid #e2dfd8 !important;
    background: #f4f2ed !important;
    color: #1a1f1d !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    padding: 0 !important;
    min-width: 0 !important;

    /* a téma !important-tal állítja a gombok szélességét/megjelenítését,
       ezért itt is !important kell -- enélkül 10px-re esik össze */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 46px !important;
    height: 46px !important;
    flex: 0 0 auto !important;
    font-size: 30px !important;
    line-height: 1 !important;
    border-radius: 50% !important;
}

.mgh-ak-modal .mgh-ak-x:hover {
    background: #0e2a21 !important;
    border-color: #0e2a21 !important;
    color: #ffffff !important;
}

.mgh-ak-wrap .mgh-ak-btn {
    border-radius: 6px !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    box-shadow: none !important;
    min-width: 0 !important;
    line-height: 1.2 !important;
}

.mgh-ak-wrap .mgh-ak-btn.is-primary {
    background: #0e2a21 !important;
    border-color: #0e2a21 !important;
    color: #ffffff !important;
}

.mgh-ak-wrap .mgh-ak-btn.is-primary:hover {
    background: #17402f !important;
    border-color: #17402f !important;
}

.mgh-ak-wrap .mgh-ak-btn.is-ghost {
    background: #ffffff !important;
    border: 1px solid #d3d6d1 !important;
    color: #1a1f1d !important;
}

.mgh-ak-wrap .mgh-ak-btn.is-text {
    background: transparent !important;
    border: 0 !important;
    color: #0e2a21 !important;
}

.mgh-ak-wrap .mgh-ak-done h3 {
    font-size: 23px !important;
    font-weight: 500 !important;
    color: #1a1f1d !important;
    margin: 0 0 12px !important;
    text-transform: none !important;
}

.mgh-ak-wrap .mgh-ak-label,
.mgh-ak-wrap .mgh-ak-opt,
.mgh-ak-wrap .mgh-ak-check {
    text-transform: none !important;
    letter-spacing: normal !important;
}

.mgh-ak-wrap input,
.mgh-ak-wrap select,
.mgh-ak-wrap textarea {
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    min-height: 0 !important;
}

.mgh-ak-inline-title {
    text-transform: none !important;
}
