/*
 * In-Content Signup Card — modern app-login style
 * Matches the visual language of /home/thassyo/Kondado/app/views/signup.jade
 * (max-width 480px, 2×2 SSO grid icon-only, brand blue #1075BD, modern
 * border-radius 10-16px). Trial-conversion form: same SSO endpoints + email
 * submit URL as the institutional embedded form.
 *
 * Animation: card collapsed by default (grid-template-rows: 0fr) and
 * expands to 1fr when IntersectionObserver adds .active.  No dismiss path.
 */

/* ── Wrapper: collapsed → expanded animation ── */

.content-supplement {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    margin: 0 auto;
    transition: grid-template-rows 0.5s ease-out,
                opacity 0.4s ease-out,
                margin 0.5s ease-out;
}

.content-supplement.active {
    grid-template-rows: 1fr;
    opacity: 1;
    margin: 2.5rem auto;
}

.content-supplement .kdd-incontent-inner {
    overflow: hidden;
    min-height: 0;
}

@supports not (grid-template-rows: 0fr) {
    .content-supplement {
        display: block;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        margin: 0 auto;
        transition: max-height 0.5s ease-out,
                    opacity 0.3s ease-out,
                    margin 0.5s ease-out;
    }
    .content-supplement.active {
        max-height: 900px;
        opacity: 1;
        margin: 2.5rem auto;
        overflow: visible;
    }
    .content-supplement .kdd-incontent-inner {
        overflow: visible;
        min-height: auto;
    }
}

/* ── Card container — modern, narrow, centered ── */

.kdd-incontent-card {
    max-width: 480px;
    width: 100%;
}

.kdd-incontent-card .kdd-incontent-inner {
    background: #fff;
    border: 1.5px solid #e9ecef;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(35, 59, 139, 0.06);
    padding: 32px;
    box-sizing: border-box;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* End placement — slightly bolder shadow for emphasis */
.content-supplement-end .kdd-incontent-inner {
    box-shadow: 0 6px 24px rgba(35, 59, 139, 0.10);
}

/* ── Headline ── */

.kdd-incontent-card .kdd-incontent-headline {
    text-align: center;
    margin-bottom: 24px;
}
.kdd-incontent-card .kdd-incontent-title {
    color: #273990;
    font-family: 'Assistant', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    font-size: 1.35rem;
    margin: 0 0 8px;
    line-height: 1.2;
}
.kdd-incontent-card .kdd-incontent-terms {
    color: #6c757d;
    font-size: 0.78rem;
    margin: 0;
    line-height: 1.4;
}

/* ── SSO buttons — full-width, one per row ── */

.kdd-incontent-card .kdd-incontent-sso-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 8px;
}

.kdd-incontent-card .kdd-incontent-sso-btn {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    height: 52px;
    border: 1.5px solid #e9ecef;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
    box-sizing: border-box;
    margin: 0;
    width: 100%;
    color: #383e51;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 500;
    text-align: left;
}
.kdd-incontent-card .kdd-incontent-sso-btn:hover {
    border-color: #1075BD;
    background: rgba(16, 117, 189, 0.04);
}
.kdd-incontent-card .kdd-incontent-sso-btn:active {
    transform: scale(0.99);
}
.kdd-incontent-card .kdd-incontent-sso-btn:focus-visible {
    outline: 2px solid #1075BD;
    outline-offset: 2px;
}
.kdd-incontent-card .kdd-incontent-sso-icon {
    width: 22px;
    height: 22px;
    display: block;
    object-fit: contain;
    flex: 0 0 22px;
    margin-right: 14px;
}
.kdd-incontent-card .kdd-incontent-sso-label {
    flex: 1;
    line-height: 1.2;
    /* Keeps the label visually centered with the row by adding the same
       offset as the icon width on the right, so icon+label appear centered. */
    text-align: center;
    padding-right: 36px;
}

/* ── Divider "or sign up with email" ── */

.kdd-incontent-card .kdd-incontent-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
}
.kdd-incontent-card .kdd-incontent-divider::before,
.kdd-incontent-card .kdd-incontent-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e9ecef;
}
.kdd-incontent-card .kdd-incontent-divider span {
    padding: 0 16px;
    color: #6c757d;
    font-size: 12px;
    font-weight: 500;
    text-transform: lowercase;
}

/* ── Email form ── */

.kdd-incontent-card .kdd-incontent-form {
    margin: 0;
}
.kdd-incontent-card .kdd-incontent-email {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #e9ecef;
    border-radius: 10px;
    font-size: 15px;
    background: #fafbfc;
    color: #212529;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}
.kdd-incontent-card .kdd-incontent-email::placeholder {
    color: #adb5bd;
}
.kdd-incontent-card .kdd-incontent-email:focus {
    border-color: #1075BD;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(16, 117, 189, 0.1);
}
.kdd-incontent-card .kdd-incontent-email-error {
    color: #dc3545;
    font-size: 12px;
    margin: 6px 2px 0;
}

.kdd-incontent-card .kdd-incontent-submit {
    width: 100%;
    margin-top: 14px;
    padding: 14px 20px;
    background: #1075BD;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    font-family: inherit;
}
.kdd-incontent-card .kdd-incontent-submit:hover {
    background: #273990;
    box-shadow: 0 4px 12px rgba(16, 117, 189, 0.3);
    transform: translateY(-1px);
}
.kdd-incontent-card .kdd-incontent-submit:active {
    transform: translateY(0);
}
.kdd-incontent-card .kdd-incontent-submit:focus-visible {
    outline: 2px solid #273990;
    outline-offset: 2px;
}

/* ── Legal copy ── */

.kdd-incontent-card .kdd-incontent-legal {
    color: #888;
    font-size: 11.5px;
    margin: 16px 0 0;
    text-align: center;
    line-height: 1.5;
}
.kdd-incontent-card .kdd-incontent-legal a {
    color: #1075BD;
    text-decoration: none;
}
.kdd-incontent-card .kdd-incontent-legal a:hover {
    text-decoration: underline;
}

/* ── Mobile ── */

@media (max-width: 575px) {
    .kdd-incontent-card .kdd-incontent-inner {
        padding: 24px 20px;
        border-radius: 14px;
    }
    .kdd-incontent-card .kdd-incontent-title {
        font-size: 1.2rem;
    }
}
