/* ==================================================
   Author Biography Modal
   Optimizely CMS - Casualty Solutions Experts
   ================================================== */

/* Main modal container */

#author-bio-modal {
    position: fixed;
    box-sizing: border-box;

    width: min(600px, calc(100% - 32px));
    max-width: 600px;
    max-height: min(85vh, 800px);

    margin: auto;
    padding: 40px;

    border: none;
    border-radius: 8px;

    background: #ffffff;
    color: #222222;

    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);

    overflow-y: auto;
    overscroll-behavior: contain;
}

/* Darkened background */

#author-bio-modal::backdrop {
    background: rgba(0, 0, 0, 0.65);
}

/* Close button */

#author-bio-modal .author-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;

    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    border: none;
    border-radius: 4px;

    background: transparent;
    color: #333333;

    font-size: 28px;
    line-height: 1;

    cursor: pointer;
}

#author-bio-modal .author-modal-close:hover {
    background: #f0f0f0;
}

#author-bio-modal .author-modal-close:focus-visible {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Biography heading */

#author-bio-body h2 {
    margin: 0 40px 8px 0;
    font-size: 28px;
    line-height: 1.25;
    font-weight: 500;
}

/* Job title */

#author-bio-body h2 + p {
    margin-top: 0;
    margin-bottom: 24px;
    color: #555555;
    font-size: 16px;
}

/* Biography paragraphs */

#author-bio-body p {
    line-height: 1.65;
    overflow-wrap: break-word;
}

/* Prevent long content from overflowing */

#author-bio-body {
    max-width: 100%;
    overflow-wrap: anywhere;
}

/* Mobile */

@media (max-width: 767px) {

    #author-bio-modal {
        width: calc(100% - 24px);
        max-width: none;
        max-height: 90dvh;
        padding: 32px 24px;
        border-radius: 8px;
    }

    #author-bio-body h2 {
        font-size: 24px;
    }

    #author-bio-body p {
        font-size: 16px;
    }

}