/*
 * F&F Event Manager — publieke styling
 * Versie: 1.5.1
 */

.ffem-wrap {
    max-width: 1040px;
    margin: 0 auto;
}

.ffem-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    margin: 20px 0;
}

.ffem-hero-card {
    background: linear-gradient(135deg, #fff7ed, #fdf2f8);
}

.ffem-event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.ffem-event-card h3,
.ffem-hero-card h2 {
    margin-top: 8px;
    margin-bottom: 8px;
}

.ffem-muted {
    color: #64748b;
}

.ffem-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ffem-pill.is-open {
    background: #dcfce7;
    color: #166534;
}

.ffem-pill.is-closed {
    background: #fee2e2;
    color: #991b1b;
}

.ffem-button,
.ffem-auth-card input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: #111827;
    color: #ffffff !important;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
}

.ffem-button:hover,
.ffem-auth-card input[type="submit"]:hover {
    background: #374151;
}

.ffem-button-secondary {
    background: #e5e7eb;
    color: #111827 !important;
    margin-left: 8px;
}

.ffem-button-secondary:hover {
    background: #d1d5db;
}

.ffem-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ffem-form h3 {
    margin: 8px 0 0;
}

.ffem-form label,
.ffem-auth-card label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-weight: 700;
    margin-bottom: 18px;
}

.ffem-form input,
.ffem-form select,
.ffem-form textarea,
.ffem-auth-card input[type="text"],
.ffem-auth-card input[type="email"],
.ffem-auth-card input[type="password"],
.ffem-auth-card input[type="number"] {
    width: 100%;
    border: 1px solid rgba(15, 23, 42, 0.18);
    border-radius: 12px;
    padding: 12px 13px;
    font: inherit;
    background: #ffffff;
    box-sizing: border-box;
}

.ffem-form input:disabled,
.ffem-form select:disabled,
.ffem-form textarea:disabled {
    background: #f8fafc;
    color: #64748b;
}

.ffem-help {
    color: #64748b;
    font-weight: 500;
    line-height: 1.35;
}

.ffem-hp-field {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.ffem-two-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.ffem-fieldset {
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 14px;
    padding: 18px;
    margin: 4px 0 8px;
}

.ffem-fieldset legend {
    padding: 0 8px;
    font-weight: 800;
}

.ffem-checkbox {
    flex-direction: row !important;
    align-items: center;
    gap: 10px !important;
    font-weight: 600 !important;
    margin-bottom: 12px !important;
}

.ffem-checkbox-inline {
    margin: 2px 0 0 !important;
}

.ffem-checkbox input {
    width: auto;
}

.ffem-alert {
    border-radius: 14px;
    padding: 12px 14px;
    margin: 14px 0;
    font-weight: 700;
}

.ffem-alert-success {
    background: #dcfce7;
    color: #166534;
}

.ffem-alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.ffem-alert-warning {
    background: #fef3c7;
    color: #92400e;
}

@media (max-width: 640px) {
    .ffem-card {
        padding: 18px;
        border-radius: 14px;
    }

    .ffem-button-secondary {
        margin-left: 0;
        margin-top: 8px;
    }
}

/* v1.4.0 configurable form spacing */
.ffem-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 18px 22px;
    margin-bottom: 22px;
}

.ffem-configured-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0 !important;
}

.ffem-configured-field.is-wide {
    grid-column: 1 / -1;
}

.ffem-configured-field input,
.ffem-configured-field select,
.ffem-configured-field textarea {
    margin-top: 0 !important;
}

@media (max-width: 720px) {
    .ffem-form-grid {
        grid-template-columns: 1fr;
    }
}

/* v1.4.0 cost preview */
.ffem-cost-preview {
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 14px;
    padding: 16px;
    background: #f8fafc;
    margin-bottom: 18px;
}

.ffem-cost-preview table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0 14px;
}

.ffem-cost-preview th,
.ffem-cost-preview td {
    text-align: left;
    border-bottom: 1px solid rgba(15, 23, 42, 0.12);
    padding: 8px 6px;
}

.ffem-cost-preview tfoot th {
    border-bottom: 0;
}

/* v1.4.0 personen/introducees */
.ffem-people-block {
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 16px;
    padding: 18px;
    background: #f8fafc;
}

.ffem-people-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.ffem-people-head h3 {
    margin-top: 0;
}

.ffem-person-row {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr)) 36px;
    gap: 14px;
    align-items: end;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 14px;
    padding: 14px;
    margin: 12px 0;
}

.ffem-person-row.is-main {
    grid-template-columns: minmax(220px, 1.5fr) minmax(180px, 1fr);
    background: #fff7ed;
}

.ffem-person-row label {
    margin-bottom: 0 !important;
}

.ffem-person-public {
    align-self: center;
}

.ffem-person-remove {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #fee2e2;
    color: #991b1b;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.ffem-attendance-list {
    display: grid;
    gap: 8px;
    padding-left: 20px;
    font-weight: 700;
}

@media (max-width: 900px) {
    .ffem-form-grid,
    .ffem-person-row,
    .ffem-person-row.is-main,
    .ffem-people-head {
        grid-template-columns: 1fr;
    }

    .ffem-people-head {
        display: grid;
    }
}

/* v1.4.0 event attendance links and member portal */
.ffem-event-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.ffem-portal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 18px;
    align-items: start;
}

.ffem-table-scroll {
    overflow-x: auto;
}

.ffem-table {
    width: 100%;
    border-collapse: collapse;
}

.ffem-table th,
.ffem-table td {
    text-align: left;
    border-bottom: 1px solid rgba(15, 23, 42, 0.12);
    padding: 10px 8px;
    vertical-align: top;
}

.ffem-button-small {
    padding: 8px 12px !important;
    font-size: 13px;
}

.ffem-button-danger {
    background: #b91c1c !important;
    border-color: #b91c1c !important;
    color: #ffffff !important;
}

.ffem-danger-card {
    border-color: rgba(185, 28, 28, 0.28) !important;
}

@media (max-width: 900px) {
    .ffem-portal-grid {
        grid-template-columns: 1fr;
    }
}

/* v1.5.1 wachtwoord stoplichtmeter */
.ffem-password-meter {
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 14px;
    padding: 12px;
    background: #f8fafc;
    margin-top: 2px;
}

.ffem-password-meter-track {
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.12);
    margin-bottom: 8px;
}

.ffem-password-meter-track span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: #94a3b8;
    transition: width 160ms ease, background-color 160ms ease;
}

.ffem-password-meter.is-red .ffem-password-meter-track span {
    background: #ef4444;
}

.ffem-password-meter.is-amber .ffem-password-meter-track span {
    background: #f59e0b;
}

.ffem-password-meter.is-green .ffem-password-meter-track span {
    background: #22c55e;
}

.ffem-password-meter-label {
    font-weight: 800;
    font-size: 0.92rem;
    color: #334155;
    margin-bottom: 8px;
}

.ffem-password-meter.is-red .ffem-password-meter-label {
    color: #991b1b;
}

.ffem-password-meter.is-amber .ffem-password-meter-label {
    color: #92400e;
}

.ffem-password-meter.is-green .ffem-password-meter-label {
    color: #166534;
}

.ffem-password-rules {
    margin: 0;
    padding-left: 18px;
    color: #64748b;
    font-size: 0.88rem;
    font-weight: 600;
}

.ffem-password-rules li {
    margin: 3px 0;
}

.ffem-password-rules li.is-valid {
    color: #166534;
}

.ffem-password-rules li.is-invalid {
    color: #991b1b;
}
