/**
 * ZB Gesuche – Frontend CSS (UIkit-Ergänzungen)
 * UIkit wird vom Theme geladen – dieses File enthält NUR plugin-spezifische
 * Ergänzungen und minimale Overrides für die Formulare.
 */

/* ===== Step Indicator ===== */
.zbg-stepper {
    display: flex;
    overflow-x: auto;
    margin-bottom: 32px;
    border-bottom: 2px solid #e5e7eb;
}
.zbg-stepper-item {
    flex: 1;
    min-width: 80px;
    text-align: center;
    padding: 10px 6px 14px;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    color: #9ca3af;
    transition: border-color .2s, color .2s;
}
.zbg-stepper-item.zbg-active  { border-color: #1a3a5c; color: #1a3a5c; font-weight: 600; }
.zbg-stepper-item.zbg-done    { border-color: #1a6b3c; color: #1a6b3c; }
.zbg-stepper-num {
    display: inline-flex; width: 26px; height: 26px; border-radius: 50%;
    align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
    background: #f3f4f6; margin-bottom: 4px;
}
.zbg-stepper-item.zbg-active .zbg-stepper-num { background: #1a3a5c; color: #fff; }
.zbg-stepper-item.zbg-done   .zbg-stepper-num { background: #1a6b3c; color: #fff; }
.zbg-stepper-label { display: block; font-size: 11px; }
@media (max-width: 640px) { .zbg-stepper-label { display: none; } .zbg-stepper-item { min-width: 40px; } }

/* ===== Step Panel Animation ===== */
.zbg-step-panel { animation: zbgFade .2s ease; }
@keyframes zbgFade { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* ===== Code Input ===== */
.zbg-code-input { font-size: 2rem !important; letter-spacing: .4em; text-align: center; font-weight: 700; text-transform: uppercase; }

/* ===== Budget Grid ===== */
.zbg-budget-row {
    display: grid; grid-template-columns: 1fr 180px;
    gap: 8px 16px; align-items: center; margin-bottom: 6px;
}
.zbg-budget-row label { font-size: 14px; margin: 0; }

/* ===== Upload Zone ===== */
.zbg-upload-zone {
    border: 2px dashed #d1d5db; border-radius: 6px; padding: 22px;
    text-align: center; cursor: pointer; transition: border-color .2s, background .2s;
    background: #fafafa;
}
.zbg-upload-zone:hover, .zbg-upload-zone.zbg-dragover { border-color: #1a3a5c; background: #f0f5fb; }
.zbg-upload-zone input[type="file"] { display: none; }
.zbg-upload-icon { font-size: 26px; display: block; margin-bottom: 6px; color: #9ca3af; }

.zbg-file-list { list-style: none; padding: 0; margin: 8px 0 0; }
.zbg-file-list li {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 10px; background: #f9fafb; border: 1px solid #e5e7eb;
    border-radius: 4px; margin-bottom: 4px; font-size: 13px;
}
.zbg-file-list .zbg-fname { flex: 1; font-weight: 500; word-break: break-all; }
.zbg-file-list .zbg-fsize { color: #9ca3af; white-space: nowrap; }
.zbg-file-delete { background: none; border: none; cursor: pointer; color: #c0392b; padding: 0 4px; font-size: 16px; }

/* ===== Registration: Process Steps ===== */
.zbg-process-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 24px 0 20px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}
.zbg-process-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 18px;
    background: #fff;
    border-bottom: 1px solid #f0f0ee;
}
.zbg-process-step:last-child { border-bottom: none; }
.zbg-process-step:nth-child(odd) { background: #fafaf8; }
.zbg-process-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #456140;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}
.zbg-process-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 14px;
    line-height: 1.5;
}
.zbg-process-text strong { color: #1f2937; font-weight: 600; }
.zbg-process-text span   { color: #6b7280; font-size: 13px; }

/* ===== Registration: Info Box ===== */
.zbg-info-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #f0f4eb;
    border: 1px solid #c8d9b4;
    border-left: 4px solid #7e9a53;
    border-radius: 0 6px 6px 0;
    padding: 14px 18px;
    margin: 0 0 24px;
    font-size: 14px;
    color: #3a5a20;
    line-height: 1.6;
}
.zbg-info-icon { flex-shrink: 0; font-size: 18px; line-height: 1.5; }

/* ===== Submit Block ===== */
.zbg-submit-block { border-top: 2px solid #e5e7eb; padding-top: 24px; margin-top: 24px; }

/* ===== Success Screen ===== */
.zbg-success-screen { text-align: center; padding: 60px 20px; }
.zbg-success-icon { font-size: 64px; display: block; margin-bottom: 16px; }

/* ===== User Bar ===== */
.zbg-user-bar { display: flex; align-items: center; gap: 12px; font-size: 13px; color: #6b7280; flex-wrap: wrap; }

/* ===== reCAPTCHA note ===== */
.zbg-recaptcha-note { font-size: 11px; color: #9ca3af; margin-top: 6px; }

/* ===== Admin: Detail Grid ===== */
.zbg-detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; margin-top: 20px; }
@media (max-width: 1024px) { .zbg-detail-grid { grid-template-columns: 1fr; } }

.zbg-data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.zbg-data-table th { padding: 7px 12px 7px 0; color: #6b7280; font-weight: 500; width: 160px; vertical-align: top; white-space: nowrap; }
.zbg-data-table td { padding: 7px 0; border-bottom: 1px solid #f3f4f6; }
.zbg-data-table tr:last-child td { border: none; }

/* Status badges */
.zbg-badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.zbg-badge-draft     { background: #f3f4f6; color: #6b7280; }
.zbg-badge-submitted { background: #dbeafe; color: #1d4ed8; }
.zbg-badge-in_review { background: #fef3c7; color: #92400e; }
.zbg-badge-approved  { background: #d1fae5; color: #065f46; }
.zbg-badge-rejected  { background: #fee2e2; color: #991b1b; }
.zbg-badge-archived  { background: #f3f4f6; color: #9ca3af; }

/* Review entries */
.zbg-review-entry { padding: 12px; border-radius: 4px; margin-bottom: 8px; font-size: 13px; border: 1px solid #e5e7eb; }
.zbg-review-approve { background: #f0fdf4; border-color: #86efac; }
.zbg-review-reject  { background: #fef2f2; border-color: #fca5a5; }
.zbg-review-role { display: inline-block; font-size: 10px; background: #e5e7eb; padding: 1px 6px; border-radius: 10px; margin-left: 4px; }

/* Log */
.zbg-log-list { list-style: none; padding: 0; margin: 0; }
.zbg-log-list li { font-size: 12px; padding: 6px 0; border-bottom: 1px solid #f3f4f6; color: #6b7280; }
.zbg-log-list time { display: block; font-size: 11px; }

/* Admin files */
.zbg-admin-files { list-style: none; padding: 0; margin: 0; }
.zbg-admin-files li { padding: 7px 0; border-bottom: 1px solid #f3f4f6; font-size: 13px; }

/* Budget total */
.zbg-budget-total-row td, .zbg-budget-total-row th { font-weight: 700; border-top: 2px solid #e5e7eb !important; }
