/**
 * DoctorBookly — compact SOS / emergency modal
 */
#emergencyMenu {
    position: fixed;
    bottom: 72px;
    right: 16px;
    left: auto;
    z-index: 9998;
    display: none;
    flex-direction: column;
    width: min(94vw, 380px);
    max-height: min(78vh, 520px);
    overflow: hidden;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.22);
    border: 1px solid #fecaca;
}

#emergencyMenu.is-open {
    display: flex !important;
}

#emergencyMenu[hidden]:not(.is-open) {
    display: none !important;
}

.dbk-sos-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #fff;
}

.dbk-sos-head__main {
    flex: 1;
    min-width: 0;
}

.dbk-sos-head h4 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
    font-family: Poppins, system-ui, sans-serif;
    line-height: 1.25;
}

.dbk-sos-head__legal {
    margin: 0;
    font-size: 10px;
    line-height: 1.4;
    opacity: 0.95;
    font-weight: 500;
}

.dbk-sos-head__legal strong {
    font-weight: 800;
}

.dbk-sos-close {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    cursor: pointer;
    font-size: 16px;
}

.dbk-sos-body {
    padding: 12px 14px 14px;
    overflow-y: auto;
    flex: 1;
}

.dbk-sos-country {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    font-size: 15px;
    font-weight: 700;
    color: #991b1b;
    font-family: Poppins, system-ui, sans-serif;
}

.dbk-sos-search {
    margin-bottom: 10px;
}

.dbk-sos-search input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    box-sizing: border-box;
    outline: none;
}

.dbk-sos-search input:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

#emergencyCountry {
    display: none;
    width: 100%;
    margin-top: 8px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    box-sizing: border-box;
}

#emergencyCountry.is-visible {
    display: block;
}

#emergencyNumbers {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dbk-sos-call-block {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #fecaca;
    background: #fff5f5;
}

.dbk-sos-call {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px 14px;
    border-radius: 0;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    box-shadow: none;
}

.dbk-sos-call-disclaimer {
    margin: 0;
    padding: 8px 10px;
    font-size: 10px;
    line-height: 1.45;
    color: #7f1d1d;
    background: #fef2f2;
    text-align: center;
    font-weight: 500;
}

.dbk-sos-call i {
    font-size: 24px;
}

.dbk-sos-call__num {
    font-size: 28px;
    line-height: 1.1;
    letter-spacing: 0.02em;
}

.dbk-sos-call__lbl {
    font-size: 11px;
    opacity: 0.92;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dbk-sos-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.dbk-sos-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 8px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    text-align: center;
    min-height: 72px;
}

.dbk-sos-mini span {
    font-size: 15px;
    font-weight: 800;
}

.dbk-sos-mini small {
    font-size: 9px;
    text-transform: uppercase;
    opacity: 0.75;
}

.dbk-sos-mini--amb {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

.dbk-sos-mini--pol {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #3b82f6;
}

.dbk-sos-foot {
    padding: 8px 14px 10px;
    border-top: 1px solid #f1f5f9;
    font-size: 11px;
    color: #64748b;
    text-align: center;
    line-height: 1.4;
}

.dbk-sos-foot a {
    color: #0d9488;
    text-decoration: none;
    font-weight: 600;
}

.dbk-sos-foot a:hover {
    text-decoration: underline;
}

body.dbk-sos-open .dbk-fab--top {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

@media (max-width: 768px) {
    #emergencyMenu {
        right: 12px;
        left: 12px;
        width: auto;
        bottom: 68px;
    }
}
