﻿*, *::before, *::after {
    box-sizing: border-box;
}

.alma-release-overlay { 
    /* colors */
    --primary-bg: rgb(33 61 96);
    --primary-bg-hover: rgb(18 34 53);
    --border-color: rgb(33 61 96);
    --icon-color: rgb(33 61 96);
    --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    /* Overlay fonts */
    --white-font: rgb(255, 255, 255);
    --black-font: rgb(0 0 0);
    --space-cadet-font: rgb(33 61 96); 
    /* Fix container sizes */
    --header-height: 50px;
    --body-height: 515px;
    --footer-height: 70px;
    --modal-height: calc( var(--header-height) + var(--body-height) + var(--footer-height));
    --modal-max-width: 490px; 
    /* spacing */
    --pad-body-v: clamp(18px, 0.6vw, 24px);
    --pad-header-v: clamp(10px, 0.3vw, 12px);
    --pad-main: 3.7rem; 
    /* Radius */
    --border-radius-modal: 6px;
    --border-radius-btn: 4px;
    font-family: var(--font-primary);
}

    .alma-release-overlay h1 {
        font-size: clamp(18px, 1vw, 20px);
        font-weight: 400;
        margin: 0;
    }

    .alma-release-overlay h2 {
        font-size: clamp(14px, 0.6vw, 16px);
        font-weight: 700;
        margin: 0;
    }

    .alma-release-overlay p, .alma-release-overlay span, .alma-release-overlay li {
        font-size: 12px;
        font-weight: 400;
        margin: 0;
    }
/* Overlay (opacity black). Hide on Alma Client Desktop */
.alma-release-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.25s ease;
    pointer-events: none;
    opacity: 0;
}

    .alma-release-overlay.is-visible {
        opacity: 1;
        pointer-events: all;
    }
/* Media */
.alma-release-modal-sum__media, 
.alma-release-modal-page__media {
    overflow: hidden;
    margin-bottom: 1rem;
}

    .alma-release-modal-sum__media img, 
    .alma-release-modal-sum__media video {
        display: block;
        width: 100%;
        height: auto;
        max-height: 200px;
        object-fit: cover;
    }

    .alma-release-modal-page__media img, 
    .alma-release-modal-page__media video {
        display: block;
        width: 100%; 
        /* height: 235px;*/
        object-fit: contain;
    }

/* Modal shell */
.alma-release-modal {
    background: rgb(255, 255, 255);
    border-radius: var(--border-radius-modal);
    width: var(--modal-max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    opacity: 0;
    will-change: transform, opacity;
    transform: translateY(10px) scale(0.98);
    transition: all 0.25s ease; 
    /* height: var(--modal-height);*/
}

.alma-release-overlay.is-visible .alma-release-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Header */
.alma-release-modal_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0 24px 24px;
    border-bottom: 1px solid rgb(222, 226, 230);
    height: var(--header-height);
}

.alma-release-modal_header-left {
    display: flex;
    align-items: center;
}

.alma-release-modal_close {
    cursor: pointer;
    color: rgb(127, 127, 127);
    background: none;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    min-height: 30px;
}

    .alma-release-modal_close:hover {
        color: var(--black-font);
    }

    .alma-release-modal_close svg {
        width: 30px;
        height: 30px;
    }

/* Body */
.body-title {
    padding: 32px 0px 16px 0px;
}

.alma-release-modal__body {
    flex: 0 0 auto;
    min-height: 0;
    padding: 0 var(--pad-main);
    height: var(--body-height); 
    /* Scrollbar */
    overflow-y: auto;
    scrollbar-width: auto;
    scrollbar-color: rgba(0,0,0,0.3) transparent;
}

.alma-release-modal__page {
    display: none;
}

    .alma-release-modal__page.is-active {
        display: block;
    }

.alma-release-modal__page-body {
    margin: 8px 0rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .alma-release-modal__page-body span {
        font-weight: 400;
        color: rgb(164, 164, 164);
        font-style: italic;
    }

/* Footer navigation */
.alma-release-modal__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px var(--pad-main) 32px var(--pad-main);
    height: auto;
}

.alma-release-modal__footer--end {
    justify-content: flex-end;
    gap: 24px;
}

/* Action buttons */
.alma-release-modal__btn {
    cursor: pointer;
    font-size: clamp(12px, 0.3vw, 13px);
    font-weight: 400;
    padding: 6px 12px;
    min-width: 100px;
    border: none;
    background: none;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    font-family: inherit;
}

.alma-release-modal__btn--back {
    color: var(--primary-bg);
}

.alma-release-modal__btn--next {
    background-color: var(--primary-bg);
    border-radius: var(--border-radius-btn);
    color: var(--white-font);
    border: 1px solid var(--primary-bg);
}

    .alma-release-modal__btn--next:hover {
        background-color: var(--primary-bg-hover);
        border: 1px solid var(--primary-bg);
    }

.alma-release-modal__btn.is-hidden {
    visibility: hidden;
    pointer-events: none;
}

.alma-release-overlay .btn-secondary {
    color: var(--primary-bg);
    background: none;
    border: 1px solid var(--primary-bg);
    border-radius: var(--border-radius-btn);
}

    .alma-release-overlay .btn-secondary:hover {
        background: var(--primary-bg-hover);
        color: var(--white-font);
    }

.alma-release-overlay .btn-tertiary {
    color: var(--primary-bg);
    background: none;
    border: none;
    border-radius: var(--border-radius-btn);
}

    .alma-release-overlay .btn-tertiary:hover {
        color: var(--primary-bg-hover);
        text-decoration: underline;
    }

/* Dot indicators */
.alma-release-modal__dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.alma-release-modal__dot {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Loading / error state */
.alma-release-modal__status {
    padding: 40px 32px;
    text-align: center;
    color: #8a93a6;
    font-size: 14px;
}

.alma-release-modal__spinner {
    width: 28px;
    height: 28px;
    border: 2.5px solid #eef0f4;
    border-top-color: #3a6dbf;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto 12px;
}

/* EHR inline: Remove overlay-positioning */
.alma-release-overlay--inline {
    position: static;
    background: none;
    opacity: 1;
    pointer-events: all;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

    .alma-release-overlay--inline .alma-release-modal {
        transform: none;
        opacity: 1;
        width: 100%;
        height: 100%; 
    }

    .alma-release-overlay--inline .alma-release-modal__body {
        flex: 1 1 0; 
        height: auto; 
    }

.alma-release-modal-settings-div {
    display: flex;
    justify-content: flex-start;
    border: solid 0.5px var(--primary-bg);
    border-radius: var(--border-radius-modal);
    padding: 0.2rem;
    align-items: center;
    margin-top: 1rem;
}

    .alma-release-modal-settings-div p {
        font-size: 11px;
    }

.alma-release-modal_summary {
    display: flex;
    flex-direction: column;
    margin-top: 16px;
}

/* Hide element */
.is-hidden {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
