/* STSB Vereinsdatenbank – Frontend Styles */
:root {
    --stsb-red: #c62828;
    --stsb-red-dark: #a31f1f;
    --stsb-red-light: #ffebee;
    --stsb-dark: #37474f;
    --stsb-gray: #78909c;
    --stsb-light: #f5f7fa;
    --stsb-border: #e0e4e8;
    --stsb-white: #ffffff;
    --stsb-radius: 6px;
    --stsb-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* ===== Vereinsdatenbank ===== */
.stsb-vdb { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }

.stsb-vdb-header { background: var(--stsb-red); color: #fff; padding: 20px 24px; border-radius: var(--stsb-radius) var(--stsb-radius) 0 0; }
.stsb-vdb-header h2 { margin: 0; font-size: 22px; font-weight: 400; }

.stsb-vdb-search { background: #546e7a; padding: 20px 24px; display: flex; flex-direction: column; gap: 12px; }
.stsb-vdb-search-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.stsb-vdb-meta { font-size: 13px; color: rgba(255,255,255,0.8); }

.stsb-select { padding: 8px 12px; border: 2px solid rgba(255,255,255,0.3); border-radius: 4px; background: var(--stsb-white); font-size: 14px; min-width: 160px; }
.stsb-select-small { min-width: 70px; }
.stsb-input { padding: 8px 14px; border: 2px solid rgba(255,255,255,0.3); border-radius: 4px; font-size: 14px; flex: 1; min-width: 200px; }

.stsb-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 20px; border: none; border-radius: 4px; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; transition: all 0.2s; }
.stsb-btn-primary { background: var(--stsb-red); color: #fff; }
.stsb-btn-primary:hover { background: var(--stsb-red-dark); color: #fff; }
.stsb-btn-secondary { background: #78909c; color: #fff; }
.stsb-btn-secondary:hover { background: #607d8b; color: #fff; }
.stsb-btn-outline { background: transparent; border: 2px solid var(--stsb-red); color: var(--stsb-red); }
.stsb-btn-outline:hover { background: var(--stsb-red); color: #fff; }
.stsb-btn-back { background: var(--stsb-red); color: #fff; font-weight: 700; text-transform: uppercase; padding: 10px 24px; border-radius: 4px; margin-top: 24px; }
.stsb-btn-back:hover { background: var(--stsb-red-dark); color: #fff; }
.stsb-btn-full { width: 100%; justify-content: center; padding: 12px; }

/* Register Button */
.stsb-btn-register { display: inline-flex; padding: 12px 32px; font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; border-radius: 4px; }

/* Registration specifics */
.stsb-register-box { max-width: 800px; }
.stsb-readonly { background: #f0f0f0 !important; color: #888 !important; cursor: not-allowed; }
.stsb-field-email-highlight { background: #2e7d32; padding: 12px; border-radius: 4px; }
.stsb-field-email-highlight label { color: #fff !important; }
.stsb-field-email-highlight input { border-color: #fff; }
.stsb-field-email-highlight .stsb-hint { color: rgba(255,255,255,0.85); }

.stsb-form-field-row-with-toggle { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.stsb-toggle-right { max-width: 200px; }
.stsb-toggle-right label { font-size: 12px; }
.stsb-toggle-right select { padding: 4px 8px; font-size: 13px; }

.stsb-vdb-label { margin-left: 4px; }
.stsb-vdb-count { margin-left: auto; font-weight: 600; color: #fff; }

/* List */
.stsb-vdb-list { background: var(--stsb-white); }
.stsb-vdb-item { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; border-bottom: 1px solid var(--stsb-border); cursor: pointer; transition: background 0.15s; }
.stsb-vdb-item:nth-child(even) { background: var(--stsb-light); }
.stsb-vdb-item:hover { background: #e3f2fd; }
.stsb-vdb-item-name { font-size: 15px; color: var(--stsb-dark); font-weight: 500; }
.stsb-vdb-item-arrow { color: var(--stsb-red); font-size: 20px; font-weight: 700; flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--stsb-red-light); display: flex; align-items: center; justify-content: center; }
.stsb-vdb-item-arrow svg { width: 16px; height: 16px; }

/* Pagination */
.stsb-vdb-pagination { display: flex; gap: 6px; justify-content: center; padding: 20px; background: var(--stsb-white); border-top: 1px solid var(--stsb-border); flex-wrap: wrap; }
.stsb-vdb-pagination button { min-width: 36px; height: 36px; border: 1px solid var(--stsb-border); border-radius: 4px; background: var(--stsb-white); cursor: pointer; font-size: 14px; color: var(--stsb-dark); transition: all 0.2s; }
.stsb-vdb-pagination button:hover { border-color: var(--stsb-red); color: var(--stsb-red); }
.stsb-vdb-pagination button.active { background: var(--stsb-red); color: #fff; border-color: var(--stsb-red); }

/* Detail View */
.stsb-vdb-detail-header { background: var(--stsb-red); color: #fff; padding: 20px 24px; border-radius: var(--stsb-radius) var(--stsb-radius) 0 0; }
.stsb-vdb-detail-header h2 { margin: 0; font-size: 22px; font-weight: 400; }
.stsb-vdb-detail-inner { background: var(--stsb-white); border-radius: var(--stsb-radius); box-shadow: var(--stsb-shadow); overflow: hidden; padding: 0 0 24px; }
#stsb-detail-content { padding: 24px; }
#stsb-detail-content h3 { color: var(--stsb-red); font-size: 22px; margin: 0 0 4px; text-transform: uppercase; padding-bottom: 12px; border-bottom: 2px solid var(--stsb-red); }
.stsb-detail-row { margin: 12px 0; font-size: 15px; line-height: 1.5; }
.stsb-detail-label { font-weight: 700; }
.stsb-detail-section { margin-top: 20px; }
.stsb-detail-section h4 { font-weight: 700; font-size: 14px; margin: 0 0 4px; }
#stsb-back-btn { margin: 0 24px 0; }

.stsb-loading { padding: 40px; text-align: center; color: var(--stsb-gray); }

/* ===== Auth Boxes ===== */
.stsb-auth-box { max-width: 500px; margin: 0 auto; background: var(--stsb-white); border-radius: var(--stsb-radius); box-shadow: var(--stsb-shadow); padding: 32px; }
.stsb-auth-box h2 { margin: 0 0 24px; font-size: 24px; color: var(--stsb-dark); }
.stsb-register-box { max-width: 700px; }

.stsb-form fieldset { border: 1px solid var(--stsb-border); border-radius: var(--stsb-radius); padding: 20px; margin: 0 0 20px; }
.stsb-form fieldset legend { font-weight: 700; font-size: 15px; color: var(--stsb-red); padding: 0 8px; text-transform: uppercase; }

.stsb-form-field { margin-bottom: 16px; }
.stsb-form-field label { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--stsb-dark); }
.stsb-form-field input, .stsb-form-field select, .stsb-form-field textarea {
    width: 100%; padding: 10px 14px; border: 2px solid var(--stsb-border); border-radius: 4px; font-size: 14px;
    transition: border-color 0.2s; box-sizing: border-box;
}
.stsb-form-field input:focus, .stsb-form-field select:focus, .stsb-form-field textarea:focus { border-color: var(--stsb-red); outline: none; }
.stsb-form-field small { color: var(--stsb-gray); font-size: 12px; margin-top: 4px; display: block; }

.stsb-form-row { display: flex; gap: 12px; }
.stsb-form-row .stsb-form-field { flex: 1; }
.stsb-form-row-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }

.stsb-hint { color: var(--stsb-red); font-size: 12px; display: block; margin: -8px 0 12px; }
.stsb-hint-internal { color: var(--stsb-gray); font-size: 13px; font-style: italic; margin: 0 0 12px; }

.stsb-btn + .stsb-btn { margin-top: 10px; }

.stsb-auth-footer { text-align: center; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--stsb-border); font-size: 14px; }
.stsb-auth-footer a { color: var(--stsb-red); text-decoration: none; }

.stsb-auth-loggedin { text-align: center; }
.stsb-auth-loggedin .stsb-btn { margin: 8px 4px; }

/* Messages */
.stsb-message { padding: 14px 18px; border-radius: 4px; margin-top: 16px; font-size: 14px; }
.stsb-message-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.stsb-message-error { background: #fbe9e7; color: #c62828; border: 1px solid #ef9a9a; }

/* Profile */
.stsb-profil-box { max-width: 900px; margin: 0 auto; background: var(--stsb-white); border-radius: var(--stsb-radius); box-shadow: var(--stsb-shadow); padding: 32px; }
.stsb-profil-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 2px solid var(--stsb-red); }
.stsb-profil-header h2 { margin: 0; color: var(--stsb-red); }

/* Responsive */
@media (max-width: 768px) {
    .stsb-vdb-search-row { flex-direction: column; }
    .stsb-select, .stsb-input { min-width: 100%; }
    .stsb-form-row, .stsb-form-row-4 { grid-template-columns: 1fr; flex-direction: column; }
    .stsb-auth-box, .stsb-profil-box { padding: 20px; }
    .stsb-profil-header { flex-direction: column; gap: 12px; align-items: flex-start; }
}
