/* =========================================================================
   WSC Bastion Schade & Storingen — huisstijl: primair #0088E4, koppen Ubuntu,
   knoppen Roboto 500 met 27px afgeronde hoeken. Hover-status is bewust
   lichtblauw (i.p.v. donkerder) om dit los te kunnen herkennen van de agenda.
   ========================================================================= */

.wm-form-wrap,
.wm-overzicht-wrap {
    --wm-primair: #0088E4;
    --wm-primair-licht: #4FC3F7;
    --wm-primair-vaag: #eaf6fd;
    --wm-tekst: #333;
    --wm-tekst-zacht: #7A7A7A;
    --wm-rand: #e3e3e3;
    max-width: 100%;
    color: var(--wm-tekst);
    font-family: "Roboto", sans-serif;
}

/* ===== Knoppen ===== */
.wm-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 24px;
    background: var(--wm-primair);
    color: #fff !important;
    border: none;
    border-radius: 27px;
    font-family: "Roboto", sans-serif;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none !important;
    transition: background 0.15s ease, opacity 0.15s ease;
    margin-top: 4px;
}
.wm-submit-btn:hover    { background: var(--wm-primair-licht); }
.wm-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.wm-submit-btn--auto    { width: auto; padding: 10px 26px; }

.wm-select {
    padding: 9px 14px;
    border: 1px solid var(--wm-rand);
    border-radius: 27px;
    background: #fff;
    color: var(--wm-tekst);
    font-family: "Roboto", sans-serif;
    font-size: 0.9em;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.wm-select:hover, .wm-select:focus {
    border-color: var(--wm-primair-licht);
    background: var(--wm-primair-vaag);
    outline: none;
}

/* =========================================================================
   Formulier (schade/storing melden)
   ========================================================================= */

.wm-form-modal-titel {
    font-family: "Ubuntu", sans-serif;
    margin: 0 0 18px;
    font-size: 1.3em;
}
.wm-huidige-foto img {
    max-width: 140px;
    border-radius: 6px;
    display: block;
    margin-bottom: 4px;
}

.wm-form-wrap { max-width: 620px; margin: 0 auto; }
.wm-form-card {
    border: 1px solid var(--wm-rand);
    border-radius: 10px;
    padding: 28px 30px;
    background: #fafafa;
}
.wm-form-card--melding { text-align: center; }
.wm-form-card--melding p { margin-top: 0; }

.wm-field-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
}
.wm-field-group label {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.95em;
}
.wm-req { color: #e74c3c; }
.wm-opt { color: #999; font-size: 0.85em; font-weight: normal; }

.wm-field-group input[type="text"],
.wm-field-group input[type="file"],
.wm-field-group select,
.wm-field-group textarea {
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1em;
    font-family: inherit;
    background: #fff;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
    width: 100%;
}
.wm-field-group input:focus,
.wm-field-group select:focus,
.wm-field-group textarea:focus {
    outline: none;
    border-color: var(--wm-primair-licht);
    box-shadow: 0 0 0 3px var(--wm-primair-vaag);
}
.wm-field-group input.wm-error,
.wm-field-group select.wm-error {
    border-color: #e74c3c;
}

.wm-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal !important;
    margin-bottom: 6px;
    cursor: pointer;
    font-size: 0.95em;
}

.wm-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal !important;
    margin-bottom: 6px;
    cursor: pointer;
    font-size: 0.95em;
}
.wm-filter-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.wm-vereniging-alles {
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--wm-rand);
    font-weight: 600 !important;
}
.wm-vereniging-lijst {
    display: flex;
    flex-direction: column;
    max-height: 180px;
    overflow-y: auto;
    padding: 2px 4px;
    border: 1px solid var(--wm-rand);
    border-radius: 8px;
}
.wm-veld-hint {
    margin: 6px 0 0;
    font-size: 0.82em;
    color: var(--wm-tekst-zacht);
}

.wm-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.wm-field-row .wm-field-group { margin-bottom: 0; }

.wm-error-msg {
    display: none;
    color: #e74c3c;
    font-size: 0.82em;
    margin-top: 3px;
}
.wm-error-msg.wm-visible { display: block; }

.wm-notice {
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 0.95em;
    line-height: 1.5;
}
.wm-notice--error   { background: #fef0f0; border: 1px solid #e74c3c; color: #c0392b; }
.wm-notice--success  { background: #edfbf0; border: 1px solid #27ae60; color: #1e6e3c; padding: 18px 20px; }

/* =========================================================================
   Overzicht
   ========================================================================= */

.wm-overzicht-wrap { max-width: 820px; margin: 0 auto; }
.wm-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.wm-toolbar-filters { display: flex; gap: 10px; flex-wrap: wrap; }

.wm-lijst { display: flex; flex-direction: column; gap: 8px; }
.wm-rij {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--wm-rand);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.wm-rij:hover {
    background: var(--wm-primair-vaag);
    border-color: var(--wm-primair-licht);
}
.wm-rij-status { flex-shrink: 0; }
.wm-rij-inhoud { flex: 1; min-width: 0; }
.wm-rij-titel { font-weight: 600; }
.wm-rij-meta {
    font-size: 0.85em;
    color: var(--wm-tekst-zacht);
    margin-top: 2px;
}
.wm-prioriteit-hoog { color: #c0392b; font-weight: 600; }
.wm-rij-pijl {
    font-size: 1.4em;
    color: var(--wm-tekst-zacht);
    flex-shrink: 0;
}
.wm-leeg { color: var(--wm-tekst-zacht); padding: 24px 0; text-align: center; }

/* ===== Badges (frontend) ===== */
.wm-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 10px;
    font-size: 0.78em;
    font-weight: 600;
    white-space: nowrap;
}
.wm-badge--blauw  { background: var(--wm-primair-vaag); color: var(--wm-primair); }
.wm-badge--oranje { background: #fff3cd; color: #856404; }
.wm-badge--groen  { background: #e8f8ee; color: #1e8449; }
.wm-badge--grijs  { background: #f0f0f0; color: #555; }

/* ===== Detail modal ===== */
.wm-modal[hidden] { display: none; }
.wm-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 9998;
}
.wm-modal-card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 10px;
    padding: 28px 30px;
    max-width: 640px;
    width: calc(100% - 40px);
    max-height: 85vh;
    overflow-y: auto;
    z-index: 9999;
    box-shadow: 0 12px 40px rgba(0,0,0,.2);
}
.wm-modal-sluit,
.wm-modal-bewerk-icon {
    position: absolute;
    top: 10px;
    width: 30px;
    height: 30px;
    border: none;
    background: none;
    border-radius: 50%;
    font-size: 1.4em;
    line-height: 1;
    cursor: pointer;
    color: #999;
    transition: background 0.15s ease, color 0.15s ease;
}
.wm-modal-sluit { right: 14px; }
.wm-modal-bewerk-icon { right: 52px; font-size: 1.15em; }
.wm-modal-sluit:hover,
.wm-modal-bewerk-icon:hover {
    background: var(--wm-primair-vaag);
    color: var(--wm-primair);
}
.wm-modal-status { margin-bottom: 10px; }
.wm-modal-titel {
    font-family: "Ubuntu", sans-serif;
    margin: 0 0 8px;
    font-size: 1.3em;
}
.wm-modal-verenigingen:not(:empty) {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}
.wm-vereniging-badge { font-weight: 600; }
.wm-modal-meta {
    font-size: 0.85em;
    color: var(--wm-tekst-zacht);
    margin-bottom: 14px;
}
.wm-status-wijzig {
    background: var(--wm-primair-vaag);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 16px;
}
.wm-status-wijzig label {
    display: block;
    font-weight: 600;
    font-size: 0.85em;
    margin-bottom: 6px;
}
.wm-status-wijzig-rij { display: flex; gap: 8px; }
.wm-status-wijzig-rij .wm-select { flex: 1; }

.wm-modal-foto {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 14px;
}
.wm-modal-beschrijving {
    margin: 0 0 20px;
    line-height: 1.55;
    white-space: pre-line;
}
.wm-modal-opmerkingen-kop {
    font-family: "Ubuntu", sans-serif;
    font-size: 1em;
    margin: 0 0 10px;
    border-top: 1px solid var(--wm-rand);
    padding-top: 16px;
}
.wm-modal-opmerkingen { margin-bottom: 14px; }
.wm-opmerking {
    padding: 10px 0;
    border-top: 1px solid #eee;
}
.wm-opmerking:first-child { border-top: none; padding-top: 0; }
.wm-opmerking-meta {
    font-size: 0.8em;
    color: var(--wm-tekst-zacht);
    margin-bottom: 3px;
}
.wm-opmerking-tekst { white-space: pre-line; line-height: 1.5; }

.wm-opmerking--systeem {
    padding: 6px 0;
    font-size: 0.8em;
    font-style: italic;
    color: var(--wm-tekst-zacht);
}
.wm-opmerking--systeem:first-child { border-top: none; padding-top: 6px; }

.wm-opmerking-form textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95em;
    box-sizing: border-box;
    margin-bottom: 10px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.wm-opmerking-form textarea:focus {
    outline: none;
    border-color: var(--wm-primair-licht);
    box-shadow: 0 0 0 3px var(--wm-primair-vaag);
}

/* ===== Responsief ===== */
@media ( max-width: 600px ) {
    .wm-field-row { grid-template-columns: 1fr; }
    .wm-form-card { padding: 20px 16px; }
    .wm-rij { flex-wrap: wrap; }
}
