* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background: #fff;
    color: #17212b;
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

.widget {
    width: 100%;
    border: 1px solid #e0e4e8;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.widget__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #e8ebee;
}

.widget__brand {
    color: #17212b;
    font-size: 1rem;
    font-weight: 800;
    text-decoration: none;
}

.widget__brand:hover {
    text-decoration: underline;
}

.widget__label {
    color: #6a747d;
    font-size: 0.8rem;
}

.widget-search {
    position: relative;
    padding: 14px 16px;
    border-bottom: 1px solid #e8ebee;
}

.widget-search__label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.widget-search__input {
    width: 100%;
    min-height: 42px;
    border: 1px solid #cfd5da;
    border-radius: 9px;
    padding: 9px 11px;
    background: #fff;
    color: inherit;
    font: inherit;
}

.widget-search__input:focus {
    outline: 2px solid #17212b;
    outline-offset: 2px;
}

.widget-search__results {
    position: absolute;
    z-index: 20;
    top: calc(100% - 8px);
    right: 16px;
    left: 16px;
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid #d8dde2;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
}

.widget-search__result {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border-bottom: 1px solid #edf0f2;
    color: #17212b;
    text-decoration: none;
}

.widget-search__result:last-child {
    border-bottom: 0;
}

.widget-search__result:hover {
    background: #f5f7f8;
}

.widget-search__result span {
    color: #68737d;
    font-size: 0.78rem;
}

.widget-search__empty {
    padding: 12px;
    color: #68737d;
    font-size: 0.85rem;
}

.widget__title {
    padding: 15px 16px 5px;
}

.widget__title h1 {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.3;
}

.widget-events {
    padding: 8px 16px;
}

.widget-event {
    padding: 13px 0;
    border-bottom: 1px solid #e8ebee;
}

.widget-event:last-child {
    border-bottom: 0;
}

.widget-event__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.widget-badge {
    display: inline-block;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 700;
}

.widget-badge--police {
    background: #e7f0ff;
    color: #24518a;
}

.widget-badge--rescue {
    background: #ffe8e5;
    color: #9f241b;
}

.widget-badge--sea-rescue {
    background: #dff7f4;
    color: #0f5f59;
}

.widget-badge--other {
    background: #edf0f2;
    color: #45515c;
}

.widget-event__time {
    flex: 0 0 auto;
    color: #6a747d;
    font-size: 0.78rem;
}

.widget-event__description {
    display: -webkit-box;
    margin: 9px 0;
    overflow: hidden;
    color: #38434d;
    font-size: 0.9rem;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.widget-event__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #6a747d;
    font-size: 0.75rem;
}

.widget-event__footer a {
    color: #17212b;
    font-weight: 600;
}

.widget__more {
    display: block;
    margin: 8px 16px 16px;
    border-radius: 9px;
    padding: 11px 14px;
    background: #17212b;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.widget__more:hover {
    text-decoration: underline;
}

.widget__empty,
.widget__welcome {
    margin: 0;
    padding: 22px 16px;
    color: #58636d;
}

.widget__welcome strong {
    display: block;
    margin-bottom: 5px;
    color: #17212b;
}

.widget__welcome p {
    margin: 0;
}