.medicalc-consent[hidden],
.medicalc-consent__summary[hidden],
.medicalc-consent__preferences[hidden] {
    display: none !important;
}

.medicalc-consent {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.55);
}

.medicalc-consent__panel {
    width: min(760px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 26px;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
    color: #161616;
}

.medicalc-consent h2,
.medicalc-consent h3 {
    margin-top: 0;
    color: #111111;
}

.medicalc-consent h2 {
    margin-bottom: 12px;
    font-size: 25px;
    line-height: 1.25;
}

.medicalc-consent h3 {
    margin-bottom: 5px;
    font-size: 17px;
}

.medicalc-consent p {
    margin-top: 0;
    line-height: 1.6;
}

.medicalc-consent__links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.medicalc-consent__links a {
    color: #005fa8;
    text-decoration: underline;
}

.medicalc-consent__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.medicalc-consent__button {
    min-height: 44px;
    padding: 10px 17px;
    border: 2px solid transparent;
    border-radius: 7px;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
}

.medicalc-consent__button:focus-visible,
.medicalc-consent-settings:focus-visible,
.medicalc-consent__switch input:focus-visible + span {
    outline: 3px solid #ffbf47;
    outline-offset: 3px;
}

.medicalc-consent__button--primary {
    border-color: #006eb8;
    background: #006eb8;
    color: #ffffff;
}

.medicalc-consent__button--primary:hover {
    border-color: #005b99;
    background: #005b99;
}

.medicalc-consent__button--secondary {
    border-color: #006eb8;
    background: #ffffff;
    color: #005f9f;
}

.medicalc-consent__button--secondary:hover {
    background: #edf7fd;
}

.medicalc-consent__button--text {
    background: transparent;
    color: #005f9f;
    text-decoration: underline;
}

.medicalc-consent__preferences-header {
    margin-bottom: 18px;
}

.medicalc-consent__category {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    padding: 17px 0;
    border-top: 1px solid #dddddd;
}

.medicalc-consent__category p {
    margin-bottom: 0;
    color: #4d4d4d;
    font-size: 14px;
}

.medicalc-consent__always-on {
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 700;
    color: #25743d;
}

.medicalc-consent__switch {
    position: relative;
    flex: 0 0 auto;
    width: 50px;
    height: 28px;
}

.medicalc-consent__switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.medicalc-consent__switch span {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #777777;
    cursor: pointer;
    transition: background 0.2s ease;
}

.medicalc-consent__switch span::after {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    content: "";
    transition: transform 0.2s ease;
}

.medicalc-consent__switch input:checked + span {
    background: #006eb8;
}

.medicalc-consent__switch input:checked + span::after {
    transform: translateX(22px);
}

.medicalc-consent__actions--preferences {
    padding-top: 20px;
    border-top: 1px solid #dddddd;
}

.medicalc-consent-settings {
    position: fixed;
    right: 14px;
    bottom: 14px;
    z-index: 99990;
    padding: 9px 12px;
    border: 1px solid #d4d4d4;
    border-radius: 6px;
    background: #ffffff;
    color: #222222;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.16);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.medicalc-consent-open {
    overflow: hidden;
}

@media (max-width: 600px) {
    .medicalc-consent {
        padding: 0;
    }

    .medicalc-consent__panel {
        width: 100%;
        max-height: 90vh;
        padding: 21px 18px;
        border-radius: 14px 14px 0 0;
    }

    .medicalc-consent__actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .medicalc-consent__button {
        width: 100%;
    }

    .medicalc-consent__category {
        align-items: flex-start;
    }

    .medicalc-consent-settings {
        right: 10px;
        bottom: 10px;
    }
}
