/* ============================================================
   OpenMelder — frontend styles
   Used by [openmelder] and [openmelder_overview] shortcodes.
   ============================================================ */

/* -- Overview grid -- */
.om-overview {
    max-width: 860px;
    margin: 0 auto;
    font-family: inherit;
}

.om-overview-intro {
    margin-bottom: 20px;
    font-size: 1.05em;
}

.om-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(161px, 1fr));
    gap: 7px;
}

.om-overview-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1px 1px;
    border: 2px solid #0073aa;
    border-radius: 8px;
    transition: background .15s, color .15s;
}

/* Theme-Linkregeln (.kux-prose a / a:visited, bis 0,2,1) sonst überstimmen:
   besuchte Karten sehen aus wie unbesuchte – auch beim Hovern. */
.om-overview a.om-overview-card,
.om-overview a.om-overview-card:visited {
    color: inherit;
    text-decoration: none;
}

.om-overview a.om-overview-card:hover,
.om-overview a.om-overview-card:visited:hover {
    background: #0073aa;
    color: #fff;
}

.om-card-icon {
    font-size: 2.4em;
    margin-bottom: 8px;
}

.om-card-title {
    font-weight: 700;
    font-size: 1em;
    margin-bottom: 6px;
}

.om-card-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 10px;
    background: #eef1f5;
    color: #445;
    font-size: .72em;
    font-weight: 600;
    vertical-align: middle;
    white-space: nowrap;
}

.om-card-desc {
    font-size: .85em;
    opacity: .8;
}

/* -- Form wrapper -- */
.om-form-wrap {
    max-width: 740px;
    margin: 0 auto;
    font-family: inherit;
}

.om-back-link {
    display: inline-block;
    margin-bottom: 12px;
    color: #0073aa;
    text-decoration: none;
    font-size: .9em;
}

.om-back-link:hover {
    text-decoration: underline;
}

.om-form-title {
    margin-bottom: 4px;
}

.om-form-desc {
    margin-top: 0;
    color: #555;
}

.om-map-hint {
    font-size: .9em;
    color: #555;
    margin-bottom: 6px;
}

#om-map {
    height: 380px;
    border-radius: 8px;
    margin-bottom: 0;
    border: 1px solid #ddd;
}

.om-location-info {
    padding: 8px 12px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    font-size: .88em;
    color: #444;
    margin-bottom: 24px;
}

.om-field-group {
    margin-bottom: 18px;
}

.om-field-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.om-field-group input[type="text"],
.om-field-group input[type="email"],
.om-field-group textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #bbb;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: .97em;
    font-family: inherit;
}

.om-field-group textarea {
    min-height: 110px;
    resize: vertical;
}

.om-field-group input:focus,
.om-field-group textarea:focus {
    border-color: #0073aa;
    outline: 2px solid #0073aa33;
}

.om-req {
    color: #c00;
    margin-left: 2px;
}

.om-hp-field {
    position: absolute;
    left: -9999px;
    height: 0;
    overflow: hidden;
}

.om-submit-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.om-btn-submit {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 11px 28px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-family: inherit;
}

.om-btn-submit:hover {
    background: #005d8c;
}

.om-btn-submit:disabled {
    opacity: .6;
    cursor: default;
}

.om-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #ddd;
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: om-spin .7s linear infinite;
}

.om-spinner[hidden] {
    display: none;
}

@keyframes om-spin {
    to {
        transform: rotate(360deg);
    }
}

.om-msg {
    padding: 14px 16px;
    border-radius: 6px;
    margin-top: 12px;
}

.om-msg-error {
    background: #fdecea;
    border: 1px solid #f5c6c6;
    color: #8b1a1a;
}

.om-msg-success {
    background: #e8f5e9;
    border: 1px solid #c3e6cb;
    color: #1a5c2a;
    font-size: 1.05em;
}

.om-pin {
    font-size: 22px;
    line-height: 1;
}

.om-lamp {
    font-size: 14px;
    line-height: 1;
}

.om-lamp-open {
    filter: grayscale(1) brightness(0);
}

#om-lamp-toast {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(0, 0, 0, .78);
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s, transform .2s;
    z-index: 1000;
}

#om-lamp-toast.om-lamp-toast-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* -- Uebersicht (public overview map) -- */
.om-uebersicht-wrap {
    max-width: 100%;
}

#om-uebersicht-map {
    width: 100%;
    height: 520px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.om-report-popup {
    font-size: 14px;
    line-height: 1.5;
}

.om-report-popup strong {
    display: block;
    margin-bottom: 4px;
}

.om-report-marker {
    background: #fff;
    border: 2px solid #d00;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
