/* ============================================================
   MIPASOFT AI PROCESS AGENT
   Based on MIPASHOP AI Assistant
   ============================================================ */

:root {
    --mipa-blue-dark: #062c5c;
    --mipa-blue: #0879c9;
    --mipa-blue-light: #13a6e8;
    --mipa-orange: #ff7100;
    --mipa-orange-dark: #f04d00;
    --mipa-yellow: #ffcb05;
    --mipa-white: #ffffff;
    --mipa-gray: #f4f7fa;
    --mipa-text: #102744;
    --mipa-text-soft: #65758a;
    --mipa-muted: #65758a;
}


/* ============================================================
   PAGE
   ============================================================ */

.mipa-ai-page {
    padding: 70px 20px 90px;
    background: #f7f9fc;
}

.mipa-ai-page__container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
}

.mipa-ai-page__intro {
    max-width: 760px;
    margin: 0 auto 36px;
    text-align: center;
}

.mipa-ai-page__eyebrow {
    margin-bottom: 10px;

    color: var(--mipa-orange);

    font-size: 14px;
    font-weight: 800;

    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.mipa-ai-page__title {
    margin: 0 0 15px;

    color: var(--mipa-blue-dark);

    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    line-height: 1.15;
}

.mipa-ai-page__lead {
    margin: 0;

    color: var(--mipa-muted);

    font-size: 18px;
    line-height: 1.7;
}

/* ============================================================
   HERO BENEFITS
   ============================================================ */

.mipa-ai-page__benefits {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;

    gap: 12px 28px;

    margin-top: 22px;
}

.mipa-ai-page__benefits span {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    color: var(--mipa-text);

    font-size: 14px;
    font-weight: 600;
}

.mipa-ai-page__benefits i {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 26px;
    height: 26px;

    color: var(--mipa-blue);
    background: rgba(8, 121, 201, 0.08);

    border-radius: 50%;
}


/* ============================================================
   START AREA
   ============================================================ */

.mipa-ai-start {
    display: grid;
    grid-template-columns: minmax(280px, 0.72fr) minmax(500px, 1.28fr);

    gap: 24px;

    align-items: stretch;
}


/* ============================================================
   GUIDE
   ============================================================ */

.mipa-ai-guide {
    padding: 34px 30px;

    color: #ffffff;

    background:
            linear-gradient(
                    145deg,
                    var(--mipa-blue-dark) 0%,
                    #084a87 100%
            );

    border-radius: 20px;

    box-shadow:
            0 18px 50px rgba(6, 44, 92, 0.14);
}

.mipa-ai-guide__eyebrow {
    margin-bottom: 9px;

    color: var(--mipa-yellow);

    font-size: 12px;
    font-weight: 800;

    text-transform: uppercase;
    letter-spacing: 1.4px;
}

.mipa-ai-guide__title {
    margin: 0 0 12px;

    color: #ffffff;

    font-size: 25px;
    font-weight: 800;
    line-height: 1.25;
}

.mipa-ai-guide__intro {
    margin: 0 0 30px;

    color: rgba(255, 255, 255, 0.78);

    font-size: 14px;
    line-height: 1.65;
}


/* STEPS */

.mipa-ai-guide__steps {
    display: flex;
    flex-direction: column;

    gap: 25px;
}

.mipa-ai-guide__step {
    display: grid;
    grid-template-columns: 42px 1fr;

    gap: 14px;
}

.mipa-ai-guide__step > span {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    color: var(--mipa-blue-dark);
    background: var(--mipa-yellow);

    border-radius: 12px;

    font-size: 13px;
    font-weight: 900;
}

.mipa-ai-guide__step strong {
    display: block;

    margin: 1px 0 4px;

    color: #ffffff;

    font-size: 15px;
    font-weight: 700;
}

.mipa-ai-guide__step p {
    margin: 0;

    color: rgba(255, 255, 255, 0.72);

    font-size: 13px;
    line-height: 1.55;
}

/* ============================================================
   CONTACT / LEAD CARD
   ============================================================ */

.mipa-ai-lead {
    max-width: none;
    margin: 0;

    padding: 34px;

    background: #ffffff;

    border: 1px solid rgba(6, 44, 92, 0.10);
    border-radius: 20px;

    box-shadow:
            0 18px 50px rgba(6, 44, 92, 0.10);
}

.mipa-ai-lead__title {
    margin: 0 0 8px;

    color: var(--mipa-blue-dark);

    font-size: 24px;
    font-weight: 800;
}

.mipa-ai-lead__text {
    margin: 0 0 25px;

    color: var(--mipa-muted);

    font-size: 14px;
    line-height: 1.6;
}

.mipa-ai-lead__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.mipa-ai-lead .form-group {
    margin-bottom: 18px;
}

.mipa-ai-lead__grid .form-group {
    margin-bottom: 0;
}

.mipa-ai-lead label {
    display: block;

    margin-bottom: 7px;

    color: var(--mipa-blue-dark);

    font-size: 14px;
    font-weight: 700;
}

.mipa-ai-lead input[type="text"],
.mipa-ai-lead input[type="email"] {
    width: 100%;
    min-height: 48px;

    padding: 11px 13px;

    color: var(--mipa-text);
    background: var(--mipa-gray);

    border: 1px solid transparent;
    border-radius: 10px;

    outline: none;

    font-family: inherit;
    font-size: 15px;

    transition:
            background-color 0.2s ease,
            border-color 0.2s ease,
            box-shadow 0.2s ease;
}

.mipa-ai-lead input:focus {
    background: #ffffff;
    border-color: var(--mipa-blue);

    box-shadow:
            0 0 0 3px rgba(8, 121, 201, 0.09);
}

/* ============================================================
   CONSENTS / CHECKBOXES
   ============================================================ */

.mipa-ai-lead__consents {
    display: flex;
    flex-direction: column;
    gap: 14px;

    margin-top: 26px;
    padding-top: 22px;

    border-top: 1px solid rgba(6, 44, 92, 0.08);
}

.mipa-ai-lead__checkbox {
    display: flex !important;
    align-items: flex-start;

    gap: 12px;

    margin: 0 !important;

    color: var(--mipa-muted) !important;

    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.55;

    cursor: pointer;
}


/* Ascundem aspectul standard al browserului */

.mipa-ai-lead__checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;

    position: relative;

    width: 20px;
    height: 20px;

    min-width: 20px;

    margin: 1px 0 0 0;

    background: #ffffff;

    border: 2px solid #c5d0dc;
    border-radius: 5px;

    cursor: pointer;

    transition:
            background-color 0.18s ease,
            border-color 0.18s ease,
            box-shadow 0.18s ease;
}


/* Hover */

.mipa-ai-lead__checkbox:hover input[type="checkbox"] {
    border-color: var(--mipa-blue);
}


/* Checked */

.mipa-ai-lead__checkbox input[type="checkbox"]:checked {
    background: var(--mipa-blue);
    border-color: var(--mipa-blue);
}


/* Bifa */

.mipa-ai-lead__checkbox input[type="checkbox"]:checked::after {
    content: "";

    position: absolute;

    left: 5px;
    top: 1px;

    width: 5px;
    height: 10px;

    border: solid #ffffff;
    border-width: 0 2px 2px 0;

    transform: rotate(45deg);
}


/* Keyboard focus */

.mipa-ai-lead__checkbox input[type="checkbox"]:focus-visible {
    outline: none;

    box-shadow:
            0 0 0 3px rgba(8, 121, 201, 0.15);
}


/* Text */

.mipa-ai-lead__checkbox span {
    flex: 1;
}


/* Link GDPR */

.mipa-ai-lead__checkbox a {
    color: var(--mipa-blue);

    font-weight: 600;
    text-decoration: none;
}

.mipa-ai-lead__checkbox a:hover {
    text-decoration: underline;
}

.mipa-ai-lead__submit {
    width: 100%;
    min-height: 52px;

    margin-top: 14px;
    padding: 13px 20px;

    color: #ffffff;
    background: var(--mipa-orange);

    border: 0;
    border-radius: 10px;

    font-family: inherit;
    font-size: 15px;
    font-weight: 800;

    cursor: pointer;

    transition:
            background-color 0.2s ease,
            transform 0.2s ease;
}

.mipa-ai-lead__submit:hover:not(:disabled) {
    background: var(--mipa-orange-dark);
    transform: translateY(-1px);
}

.mipa-ai-lead__submit:disabled {
    cursor: default;
    opacity: 0.55;
}

.mipa-ai-lead__error {
    display: none;

    margin-top: 16px;
    padding: 12px 14px;

    color: #9b1c1c;
    background: #fff4f4;

    border: 1px solid #ffd6d6;
    border-radius: 9px;

    font-size: 13px;
}


/* ============================================================
   AI CHAT
   ============================================================ */

.mipa-ai {
    width: 100%;
}

.mipa-ai__window {
    width: 100%;
    max-width: 920px;
    min-height: 620px;
    margin: 0 auto;

    display: flex;
    flex-direction: column;

    background: #ffffff;

    border: 1px solid rgba(6, 44, 92, 0.10);
    border-radius: 22px;

    overflow: hidden;

    box-shadow:
            0 22px 60px rgba(6, 44, 92, 0.12);
}


/* HEADER */

.mipa-ai__header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 20px 24px;

    background:
            linear-gradient(
                    135deg,
                    var(--mipa-blue-dark) 0%,
                    #084a87 100%
            );

    border-bottom: 1px solid rgba(255,255,255,.08);
}

.mipa-ai__identity {
    display: flex;
    align-items: center;
    gap: 13px;
}

.mipa-ai__avatar {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;

    flex: 0 0 44px;

    color: var(--mipa-blue-dark);
    background: var(--mipa-yellow);

    border-radius: 13px;

    font-size: 17px;
}

.mipa-ai__title {
    color: #ffffff;

    font-size: 17px;
    font-weight: 800;
}

.mipa-ai__status {
    display: flex;
    align-items: center;

    gap: 7px;

    margin-top: 3px;

    color: rgba(255,255,255,.72);

    font-size: 12px;
}

.mipa-ai__status-dot {
    width: 7px;
    height: 7px;

    background: #52d273;

    border-radius: 50%;

    box-shadow: 0 0 0 3px rgba(82,210,115,.13);
}

.mipa-ai__header-badge {
    padding: 7px 11px;

    color: rgba(255,255,255,.85);
    background: rgba(255,255,255,.08);

    border: 1px solid rgba(255,255,255,.12);
    border-radius: 20px;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: .3px;
}



/* MESSAGES */

.mipa-ai__messages {
    flex: 1;

    padding: 28px 26px;

    overflow-y: auto;

    background:
            linear-gradient(
                    180deg,
                    #f8fbfe 0%,
                    #ffffff 100%
            );
}

.mipa-ai__message {
    max-width: 76%;

    margin-bottom: 18px;

    padding: 13px 16px;

    font-size: 14px;
    line-height: 1.6;

    white-space: pre-wrap;
}

.mipa-ai__message--assistant {
    margin-right: auto;

    color: var(--mipa-text);

    background: #ffffff;

    border: 1px solid rgba(6, 44, 92, .10);
    border-radius: 5px 16px 16px 16px;

    box-shadow:
            0 5px 18px rgba(6, 44, 92, .05);
}

.mipa-ai__message--user {
    margin-left: auto;

    color: #ffffff;

    background:
            linear-gradient(
                    135deg,
                    var(--mipa-blue) 0%,
                    var(--mipa-blue-dark) 100%
            );

    border-radius: 16px 5px 16px 16px;
}

.mipa-ai__message--assistant {
    margin-right: auto;

    color: var(--mipa-text);
    background: #ffffff;

    border: 1px solid rgba(6, 44, 92, 0.09);
    border-bottom-left-radius: 4px;
}


/* TYPING */

.mipa-ai__typing {
    display: flex;
    align-items: center;

    gap: 4px;

    width: fit-content;

    margin-top: 14px;
    padding: 12px 14px;

    background: #ffffff;

    border: 1px solid rgba(6, 44, 92, 0.09);
    border-radius: 14px;
    border-bottom-left-radius: 4px;
}

.mipa-ai__typing span {
    width: 6px;
    height: 6px;

    background: var(--mipa-muted);

    border-radius: 50%;

    animation:
            mipa-ai-dot 1.2s infinite ease-in-out;
}

.mipa-ai__typing span:nth-child(2) {
    animation-delay: 0.15s;
}

.mipa-ai__typing span:nth-child(3) {
    animation-delay: 0.30s;
}

@keyframes mipa-ai-dot {
    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.45;
    }

    30% {
        transform: translateY(-4px);
        opacity: 1;
    }
}


/* INPUT */

.mipa-ai__form {
    display: flex;
    align-items: flex-end;

    gap: 10px;

    padding: 16px 18px;

    background: #ffffff;

    border-top: 1px solid rgba(6, 44, 92, .08);
}

.mipa-ai__input {
    flex: 1;

    min-height: 48px;
    max-height: 110px;

    padding: 13px 15px;

    resize: none;

    color: var(--mipa-text);
    background: #f7f9fc;

    border: 1px solid rgba(6, 44, 92, .12);
    border-radius: 14px;

    outline: none;

    font: inherit;
    font-size: 14px;
    line-height: 1.45;

    transition:
            border-color .2s ease,
            box-shadow .2s ease,
            background .2s ease;
}

.mipa-ai__input:focus {
    background: #ffffff;

    border-color: var(--mipa-blue);

    box-shadow:
            0 0 0 3px rgba(8,121,201,.08);
}

.mipa-ai__send {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;

    flex: 0 0 48px;

    color: #ffffff;
    background: var(--mipa-blue);

    border: 0;
    border-radius: 14px;

    cursor: pointer;

    font-size: 20px;

    transition:
            transform .15s ease,
            background .2s ease;
}

.mipa-ai__send:hover:not(:disabled) {
    transform: translateY(-1px);
    background: var(--mipa-blue-dark);
}

.mipa-ai__send:disabled {
    opacity: .38;
    cursor: default;
}


/* FOOTER */

.mipa-ai__footer {
    padding: 10px 18px 12px;

    color: #8491a3;
    background: #ffffff;

    text-align: center;

    font-size: 11px;
}


/* SCROLLBAR */

.mipa-ai__messages::-webkit-scrollbar {
    width: 6px;
}

.mipa-ai__messages::-webkit-scrollbar-track {
    background: transparent;
}

.mipa-ai__messages::-webkit-scrollbar-thumb {
    background: rgba(6, 44, 92, 0.16);
    border-radius: 10px;
}


/* UTILITIES */

.mipa-ai-hidden {
    display: none !important;
}

/* ============================================================
   AI ASSESSMENT RESULT
   ============================================================ */

.mipa-ai-assessment {
    flex: 1;

    padding: 30px;

    overflow-y: auto;

    background:
            linear-gradient(
                    180deg,
                    #f8fbfe 0%,
                    #ffffff 100%
            );
}


.mipa-ai-result {
    overflow: hidden;

    background: #ffffff;

    border: 1px solid rgba(6, 44, 92, .10);
    border-radius: 18px;

    box-shadow:
            0 12px 35px rgba(6, 44, 92, .08);
}


/* HEADER */

.mipa-ai-result__header {
    display: flex;
    align-items: center;

    gap: 16px;

    padding: 24px 26px;

    background:
            linear-gradient(
                    135deg,
                    var(--mipa-blue-dark) 0%,
                    #084a87 100%
            );
}


.mipa-ai-result__icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 46px;
    height: 46px;

    flex: 0 0 46px;

    color: var(--mipa-blue-dark);
    background: var(--mipa-yellow);

    border-radius: 14px;

    font-size: 18px;
}


.mipa-ai-result__eyebrow {
    margin-bottom: 3px;

    color: rgba(255,255,255,.65);

    font-size: 11px;
    font-weight: 800;

    text-transform: uppercase;
    letter-spacing: 1px;
}


.mipa-ai-result__title {
    margin: 0;

    color: #ffffff;

    font-size: 21px;
    font-weight: 800;

    line-height: 1.3;
}


/* BODY */

.mipa-ai-result__body {
    padding: 26px;

    color: var(--mipa-text);

    font-size: 14px;
    line-height: 1.75;

    white-space: pre-wrap;
}


/* NEXT STEP */

.mipa-ai-result__next {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 24px;

    margin: 0 26px 26px;
    padding: 20px;

    background: #f5f9fd;

    border: 1px solid rgba(8, 121, 201, .10);
    border-radius: 14px;
}


.mipa-ai-result__next strong {
    display: block;

    margin-bottom: 4px;

    color: var(--mipa-blue-dark);

    font-size: 15px;
}


.mipa-ai-result__next p {
    max-width: 520px;

    margin: 0;

    color: var(--mipa-text-soft);

    font-size: 13px;
    line-height: 1.55;
}


.mipa-ai-result__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    flex: 0 0 auto;

    padding: 12px 17px;

    color: #ffffff;
    background: var(--mipa-blue);

    border-radius: 10px;

    text-decoration: none;

    font-size: 13px;
    font-weight: 800;

    transition:
            background .2s ease,
            transform .15s ease;
}


.mipa-ai-result__cta:hover {
    color: #ffffff;
    background: var(--mipa-blue-dark);

    transform: translateY(-1px);
}

/* ============================================================
   AI RESULT - STRUCTURED SECTIONS
   ============================================================ */

.mipa-ai-result__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);

    gap: 16px;

    padding: 24px;
}


.mipa-ai-result__section {
    padding: 20px;

    background: #ffffff;

    border: 1px solid rgba(6, 44, 92, .09);
    border-radius: 14px;

    box-shadow:
            0 5px 18px rgba(6, 44, 92, .04);
}


.mipa-ai-result__section-top {
    display: flex;
    align-items: center;

    gap: 12px;

    margin-bottom: 13px;
}


.mipa-ai-result__section-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    flex: 0 0 40px;

    color: var(--mipa-blue);
    background: rgba(8, 121, 201, .08);

    border-radius: 11px;

    font-size: 15px;
}


.mipa-ai-result__section-number {
    margin-bottom: 2px;

    color: var(--mipa-blue);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 1px;
}


.mipa-ai-result__section-title {
    margin: 0;

    color: var(--mipa-blue-dark);

    font-size: 15px;
    font-weight: 800;

    line-height: 1.3;
}


.mipa-ai-result__section-text {
    margin: 0;

    color: var(--mipa-text-soft);

    font-size: 13px;
    line-height: 1.65;
}


.mipa-ai-result__fallback {
    grid-column: 1 / -1;

    white-space: pre-wrap;

    color: var(--mipa-text);
    font-size: 14px;
    line-height: 1.7;
}


@media (max-width: 768px) {

    .mipa-ai-result__body {
        grid-template-columns: 1fr;

        padding: 16px;
    }

    .mipa-ai-result__section {
        padding: 17px;
    }
}



/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 640px) {

    .mipa-ai-page {
        padding: 40px 14px 60px;
    }

    .mipa-ai-page__intro {
        margin-bottom: 25px;
    }

    .mipa-ai-page__lead {
        font-size: 16px;
    }

    .mipa-ai-lead {
        padding: 22px 18px;
        border-radius: 17px;
    }

    .mipa-ai-lead__grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .mipa-ai__window {
        height: calc(100vh - 120px);
        max-height: 720px;

        border-radius: 17px;
    }

    .mipa-ai__header {
        min-height: 66px;
        padding: 11px 13px;
    }

    .mipa-ai__avatar {
        width: 38px;
        height: 38px;

        font-size: 17px;
    }

    .mipa-ai__messages {
        padding: 14px;
    }

    .mipa-ai__message {
        max-width: 91%;
    }

    .mipa-ai__form {
        padding: 10px 10px 7px;
    }

    .mipa-ai__footer {
        padding-bottom: 7px;
    }
}

/* MOBILE */

@media (max-width: 768px) {

    .ai-agent-banner-content {
        align-items: flex-start;
        flex-direction: column;

        gap: 12px;

        padding-top: 14px;
        padding-bottom: 14px;
    }

    .ai-agent-banner-text {
        align-items: flex-start;
    }

    .ai-agent-banner-text > div {
        display: block;
    }

    .ai-agent-banner-text strong,
    .ai-agent-banner-text span {
        display: block;
    }

    .ai-agent-banner-text span {
        margin-top: 3px;
    }

    .ai-agent-banner-button {
        width: 100%;

        justify-content: center;
    }

    .mipa-ai-start {
        grid-template-columns: 1fr;
    }

    .mipa-ai-guide {
        padding: 25px 22px;
    }

    .mipa-ai-page__benefits {
        gap: 10px 18px;
    }

    .mipa-ai-page__benefits span {
        font-size: 13px;
    }

}

@media (max-width: 768px) {

    .mipa-ai__window {
        min-height: 560px;
        border-radius: 16px;
    }

    .mipa-ai__header {
        padding: 16px;
    }

    .mipa-ai__header-badge {
        display: none;
    }

    .mipa-ai__messages {
        padding: 20px 14px;
    }

    .mipa-ai__message {
        max-width: 88%;
    }

    .mipa-ai__form {
        padding: 12px;
    }
}

/* ============================================================
   AI RESULT - FULL WIDTH ROW CARDS
   ============================================================ */

.mipa-ai-result__body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 24px;
    white-space: normal;
}

.mipa-ai-result__section {
    display: grid;
    grid-template-columns: minmax(190px, 230px) minmax(0, 1fr);
    align-items: start;
    gap: 24px;

    width: 100%;
    min-width: 0;
    padding: 20px 22px;

    background: #ffffff;
    border: 1px solid rgba(6, 44, 92, .09);
    border-radius: 14px;

    box-shadow:
            0 5px 18px rgba(6, 44, 92, .04);
}

.mipa-ai-result__section-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;

    min-width: 0;
    margin-bottom: 0;
}

.mipa-ai-result__section-top > div:last-child {
    min-width: 0;
}

.mipa-ai-result__section-title {
    overflow-wrap: anywhere;
}

.mipa-ai-result__section-text {
    min-width: 0;
    margin: 0;

    color: var(--mipa-text-soft);

    font-size: 14px;
    line-height: 1.7;

    white-space: pre-line;
    overflow-wrap: anywhere;
    word-break: normal;
}

/* Cardul "Date proces" conține mai multe valori pe linii separate. */
.mipa-ai-result__section:first-child .mipa-ai-result__section-text {
    color: var(--mipa-text);
}

/* Tabletă / mobil: titlul revine deasupra textului. */
@media (max-width: 768px) {

    .mipa-ai-result__body {
        gap: 12px;
        padding: 16px;
    }

    .mipa-ai-result__section {
        grid-template-columns: 1fr;
        gap: 12px;

        padding: 17px;
    }

    .mipa-ai-result__section-top {
        margin-bottom: 0;
    }

    .mipa-ai-result__section-text {
        font-size: 13px;
        line-height: 1.65;
    }
}

