.tgm-cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 99999;
    max-width: 420px;
    width: calc(100% - 48px);
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(10,10,10,0.14);
    padding: 24px;
    font-family: 'Nunito Sans', sans-serif;
}

@media (max-width: 600px) {
    .tgm-cookie-banner {
        bottom: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        padding: 20px;
    }
}

.tgm-cookie-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 15px;
    color: #0A0A0A;
    margin: 0 0 6px 0;
}

.tgm-cookie-body {
    font-size: 13px;
    color: rgba(10,10,10,0.6);
    line-height: 1.6;
    margin: 0 0 16px 0;
}

.tgm-cookie-link {
    color: #23A74A;
    text-decoration: underline;
}

.tgm-cookie-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tgm-cookie-btn {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 12px;
    border-radius: 100px;
    padding: 10px 18px;
    border: none;
    cursor: pointer;
    transition: opacity 180ms;
}

.tgm-cookie-btn:hover { opacity: 0.85; }

.tgm-cookie-btn--accept {
    background: #23A74A;
    color: #FFFFFF;
}

.tgm-cookie-btn--reject {
    background: #F8F8F6;
    color: #0A0A0A;
    border: 1px solid #E8E8E6;
}

.tgm-cookie-btn--manage {
    background: none;
    color: rgba(10,10,10,0.7);
    padding: 10px 0;
    font-size: 12px;
    font-weight: 700;
    text-decoration: underline;
}

/* --- Settings modal ------------------------------------------------------ */

.tgm-cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.tgm-cookie-modal[hidden] { display: none; }

.tgm-cookie-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10,10,10,0.5);
}

.tgm-cookie-modal-open { overflow: hidden; }

.tgm-cookie-modal-panel {
    position: relative;
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(10,10,10,0.25);
    max-width: 560px;
    width: 100%;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    font-family: 'Nunito Sans', sans-serif;
}

.tgm-cookie-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 0 24px;
}

.tgm-cookie-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    color: #0A0A0A;
    padding: 4px 8px;
}

.tgm-cookie-modal-body {
    padding: 12px 24px 8px 24px;
}

.tgm-cookie-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px 24px 24px 24px;
    border-top: 1px solid #E8E8E6;
}

.tgm-cookie-modal-footer-right {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 600px) {
    .tgm-cookie-modal { padding: 12px; }
    .tgm-cookie-modal-footer { justify-content: center; }
}

.tgm-cookie-pref-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 13px;
    color: #0A0A0A;
    margin: 0 0 14px 0;
}

.tgm-cookie-pref-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    gap: 16px;
}

.tgm-cookie-pref-name {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 700;
    font-size: 13px;
    color: #0A0A0A;
    display: block;
}

.tgm-cookie-pref-desc {
    font-size: 11px;
    color: rgba(10,10,10,0.5);
    line-height: 1.5;
    display: block;
    margin-top: 2px;
}

.tgm-cookie-pref-always {
    font-size: 11px;
    color: #23A74A;
    font-weight: 700;
    white-space: nowrap;
}

.tgm-cookie-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.tgm-cookie-toggle input { opacity: 0; width: 0; height: 0; }

.tgm-cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #E8E8E6;
    border-radius: 100px;
    transition: background 200ms;
}

.tgm-cookie-toggle-slider:before {
    content: '';
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: transform 200ms;
}

.tgm-cookie-toggle input:checked + .tgm-cookie-toggle-slider {
    background: #23A74A;
}

.tgm-cookie-toggle input:checked + .tgm-cookie-toggle-slider:before {
    transform: translateX(18px);
}

.tgm-cookie-pref-actions {
    margin-top: 16px;
}

/*
 * The banner is padded and set to width:100% on a phone, but nothing put it in
 * border-box, so the 20px of padding was added ON TOP of a full-viewport width
 * and the banner sat wider than the screen. It is the first thing every new
 * mobile visitor sees, including a patient arriving from a practice QR code,
 * so it was also the first thing that made the page scroll sideways.
 */
@media (max-width: 600px) {
    .tgm-cookie-banner,
    .tgm-cookie-banner * { box-sizing: border-box; }
    .tgm-cookie-banner {
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
    }
}
