
/* ========================================
   BABYLATOR - MAIN CONTAINER
======================================== */

.babylator {
    --bb-accent: #7358d9;
    --bb-border: #e6e5ee;

    box-sizing: border-box;
    max-width: 580px;
    margin: 0 auto;
    padding: 26px;

    background: #ffffff;
    border: 1px solid var(--bb-border);
    border-radius: 20px;

    box-shadow: 0 14px 45px rgba(34, 25, 74, 0.08);

    color: #27243b;
    font-family: inherit;
}

.babylator * {
    box-sizing: border-box;
}

.babylator [hidden] {
    display: none !important;
}


/* ========================================
   HEADER
======================================== */

.babylator-header {
    text-align: center;
    border-bottom: 1px solid var(--bb-border);
    padding-bottom: 20px;
    margin-bottom: 22px;
}

.babylator-icon {
    display: grid;
    place-items: center;

    width: 52px;
    height: 52px;

    margin: 0 auto 10px;

    border-radius: 50%;
    background: #f0ebff;
    color: var(--bb-accent);

    font-size: 29px;
}

.babylator h2 {
    margin: 0 0 7px;
    font-size: 26px;
    line-height: 1.2;
}

.babylator p {
    margin: 0;
}

.babylator-header p,
.babylator-hint,
.babylator-footer,
.babylator-thanks-step p {
    color: #777487;
    font-size: 13px;
    line-height: 1.55;
}


/* ========================================
   FORM LAYOUT
======================================== */

.babylator form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/*
 * FIX:
 * Use display:block instead of flex-direction:column.
 * This keeps the required asterisk next to
 * the label text.
 */

.babylator form > label:not(.babylator-check) {
    display: block;

    font-size: 14px;
    font-weight: 650;
    line-height: 1.5;
}

/* Required field asterisk */

.babylator label b,
.babylator label .required {
    display: inline !important;

    color: #d84e71;
    font-weight: 700;

    margin-left: 3px;
    white-space: nowrap;
}

/* Form field spacing */

.babylator form > label:not(.babylator-check) input[type="date"],
.babylator form > label:not(.babylator-check) input[type="month"],
.babylator form > label:not(.babylator-check) input[type="email"],
.babylator form > label:not(.babylator-check) textarea {
    display: block;
    margin-top: 7px;
}

.babylator input[type="email"]{width:100%;min-height:46px;padding:10px 13px;border:1px solid #dcdbe5;border-radius:10px;background:#fff;color:#302b45;font:inherit;font-weight:400;display:block;margin-top:7px}
.babylator input[type="email"]:focus{outline:2px solid #bcb0ff;outline-offset:1px}



/* ========================================
   FORM INPUTS
======================================== */

.babylator input[type="date"],
.babylator input[type="month"],
.babylator textarea {
    width: 100%;
    min-height: 46px;

    padding: 10px 13px;

    border: 1px solid #dcdbe5;
    border-radius: 10px;

    background: #ffffff;
    color: #302b45;

    font: inherit;
    font-weight: 400;
}

.babylator textarea {
    min-height: 90px;
    resize: vertical;
}

/* Input focus */

.babylator input:focus,
.babylator textarea:focus {
    outline: 2px solid #bcb0ff;
    outline-offset: 1px;
}


/* ========================================
   CHECKBOXES
======================================== */

.babylator-check {
    display: flex;
    align-items: center;

    gap: 9px;

    font-size: 13px;
    line-height: 1.4;
}

.babylator input[type="checkbox"],
.babylator input[type="radio"] {
    accent-color: var(--bb-accent);

    width: 16px;
    height: 16px;

    flex-shrink: 0;
}


/* ========================================
   PRIMARY BUTTON
======================================== */

.babylator-primary {
    width: 100%;

    padding: 14px 18px;

    border: 0;
    border-radius: 11px;

    background: var(--bb-accent);
    color: #ffffff;

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    transition: filter 0.2s;
}

.babylator-primary:hover {
    filter: brightness(0.93);
}

.babylator-primary:disabled {
    opacity: 0.55;
    cursor: wait;
}


/* ========================================
   ERROR MESSAGES
======================================== */

.babylator-error {
    padding: 10px 12px;

    border-radius: 9px;

    background: #fff0f2;
    color: #9b2845;

    font-size: 13px;
}


/* ========================================
   FOOTER
======================================== */

.babylator-footer {
    text-align: center;
    margin-top: 22px !important;
}


/* ========================================
   RESULT SCREEN
======================================== */

.babylator-eyebrow {
    text-align: center;

    color: #777487;

    font-size: 11px;
    font-weight: 750;

    letter-spacing: 0.12em;
}

.babylator-result {
    text-align: center;

    font-size: 48px;
    line-height: 1.4;
    font-weight: 800;

    color: var(--bb-accent);
}

.babylator-result-step > .babylator-hint {
    text-align: center;
    margin-bottom: 25px;
}


/* ========================================
   FIELDSET AND LEGEND
======================================== */

.babylator fieldset {
    border: 0;
    padding: 0;
    margin: 0;

    display: flex;
    flex-direction: column;

    gap: 10px;
}

.babylator legend {
    display: block;

    margin-bottom: 10px;

    font-size: 14px;
    font-weight: 650;
    line-height: 1.5;
}


/* ========================================
   FEEDBACK OPTIONS
======================================== */

.babylator-option {
    display: flex;
    align-items: center;

    gap: 10px;

    border: 1px solid var(--bb-border);
    border-radius: 10px;

    padding: 13px;

    font-size: 14px;
}


/* ========================================
   SECONDARY LINK BUTTON
======================================== */

.babylator-link {
    border: 0;

    background: none;
    color: var(--bb-accent);

    cursor: pointer;

    margin-top: 16px;
}


/* ========================================
   THANK YOU SCREEN
======================================== */

.babylator-thanks-step {
    text-align: center;
    padding: 25px 0;
}

.babylator-thanks-step p {
    margin: 10px 0 25px;
}

.babylator-success-icon {
    font-size: 35px;
    color: #279b6c;

    margin-bottom: 12px;
}


/* ========================================
   MOBILE RESPONSIVE
======================================== */

@media (max-width: 520px) {

    .babylator {
        padding: 18px;
        border-radius: 14px;
    }

    .babylator h2 {
        font-size: 23px;
    }

}



