/* ==============================================
   poliSYS Boost – Wizard & Admin Styles
   Merged from WP plugin wizard.css + container styles
   ============================================== */

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* ── Layout ──────────────────────────────── */

.boost-wizard {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.admin-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.login-container {
    max-width: 400px;
    margin: 4rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-align: center;
}

/* ── Typography ──────────────────────────── */

h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h2 { font-size: 1.2rem; margin: 1.5rem 0 0.75rem; color: #23282d; }

/* ── Buttons ─────────────────────────────── */

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    transition: opacity 0.2s;
}
.btn:hover { opacity: 0.85; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: #2563eb; }
.btn-primary:hover { background: #1d4ed8; }
.btn-secondary { background: #6b7280; color: #fff; }
.btn-secondary:hover { background: #4b5563; }
.btn-success { background: #16a34a; }
.btn-small { padding: 0.25rem 0.75rem; font-size: 0.8rem; }

/* ── Forms ───────────────────────────────── */

.form-group {
    margin-bottom: 20px;
    text-align: left;
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #23282d;
}
input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="number"],
input[type="time"],
textarea,
select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}
input:focus,
textarea:focus,
select:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 1px #2563eb;
}

textarea { resize: vertical; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.help-text {
    margin-top: 6px;
    font-size: 13px;
    color: #4b5563;
}

.inline-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.inline-form input { flex: 1; }

/* ── 9-Bereiche Progress Bar ─────────────── */

.wizard-progress-bereiche {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.progress-header {
    text-align: center;
    margin-bottom: 16px;
}

.progress-title {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
}

.progress-subtitle {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.progress-dots {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.progress-dots::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: #ddd;
    z-index: 0;
}

/* T-B-117: Bereich-Dots als <button> — Browser-Defaults zuruecksetzen */
.progress-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
    background: #f8f9fa;
    padding: 4px;
    border: none;
    font-family: inherit;
    cursor: not-allowed;
    border-radius: 6px;
    transition: background 0.15s ease, transform 0.15s ease;
}

.progress-dot.is-clickable {
    cursor: pointer;
}

.progress-dot.is-clickable:hover {
    background: #eef2ff;
}

.progress-dot.is-clickable:hover .dot-indicator {
    transform: scale(1.12);
}

.progress-dot:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.progress-dot[disabled] {
    opacity: 0.55;
}

.dot-indicator {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ddd;
    margin-bottom: 6px;
    transition: all 0.2s ease;
}

.progress-dot.completed .dot-indicator { background: #16a34a; }
.progress-dot.active .dot-indicator {
    background: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.dot-label {
    font-size: 10px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-dot.completed .dot-label,
.progress-dot.active .dot-label {
    color: #333;
    font-weight: 600;
}

/* T-B-118: Sub-Leiste fuer Unter-Steps innerhalb eines Bereichs */
.progress-sub {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed #e5e7eb;
    flex-wrap: wrap;
}

.sub-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    background: #fff;
    color: #6b7280;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: not-allowed;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.sub-dot.is-clickable { cursor: pointer; }
.sub-dot.is-clickable:hover {
    background: #eff6ff;
    border-color: #2563eb;
    color: #2563eb;
}

.sub-dot:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.sub-dot.completed {
    background: #ecfdf5;
    border-color: #16a34a;
    color: #15803d;
}

.sub-dot.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.sub-dot.pending {
    opacity: 0.7;
}

.sub-dot-indicator {
    line-height: 1;
}

@media (max-width: 600px) {
    .progress-sub { gap: 6px; }
    .sub-dot { min-width: 24px; height: 24px; font-size: 11px; padding: 0 6px; }
}

/* ── Alerts ──────────────────────────────── */

.alert {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}
.alert-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }

/* ── Save Message ────────────────────────── */

.save-message {
    margin-top: 20px;
    padding: 12px;
    border-radius: 4px;
    display: none;
}
.save-message.success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
    display: block;
}
.save-message.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    display: block;
}

/* ── Resume Banner ────────────────────────── */

.resume-banner {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-left: 4px solid #3b82f6;
    color: #1e40af;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* ── Badges ──────────────────────────────── */

.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}
.badge-draft { background: #fef3c7; color: #92400e; }
.badge-success { background: #dcfce7; color: #16a34a; }

/* ── Info-Icon & Tooltip (T-B-116) ─────── */

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 6px;
    color: #2563eb;
    cursor: help;
    vertical-align: middle;
    position: relative;
    border-radius: 50%;
    transition: color 0.15s ease, background 0.15s ease;
}

.info-icon:hover,
.info-icon:focus-visible {
    color: #1d4ed8;
    background: #eff6ff;
    outline: none;
}

.info-icon:focus-visible {
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
}

.info-icon svg {
    display: block;
    width: 14px;
    height: 14px;
}

.info-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    min-width: 200px;
    max-width: 320px;
    padding: 8px 12px;
    background: #1f2937;
    color: #fff;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    border-radius: 6px;
    white-space: normal;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: 100;
}

.info-icon::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: calc(100% + 2px);
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1f2937;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: 100;
}

.info-icon:hover::after,
.info-icon:hover::before,
.info-icon:focus-visible::after,
.info-icon:focus-visible::before,
.info-icon.is-active::after,
.info-icon.is-active::before {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 600px) {
    .info-icon::after {
        left: 0;
        transform: none;
        min-width: 180px;
        max-width: calc(100vw - 40px);
    }
    .info-icon::before { left: 12px; transform: none; }
}

/* ── Opening Hours ───────────────────────── */

.opening-hours-day {
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.day-header label { margin-bottom: 0; }

.day-times {
    display: flex;
    align-items: center;
    gap: 10px;
}

.day-times input[type="time"] {
    width: auto;
    padding: 6px 10px;
}

/* ── Step Specific ───────────────────────── */

.step-placeholder {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #ddd;
}
.step-placeholder h2 { margin-bottom: 16px; color: #4b5563; }
.step-placeholder p { color: #4b5563; }

.completion-message {
    margin-top: 20px;
    padding: 16px;
    background: #eff6ff;
    border-left: 4px solid #2563eb;
    border-radius: 4px;
}

.success-page {
    text-align: center;
    padding: 40px 20px;
}
.success-page h2 { color: #16a34a; font-size: 1.5rem; }

/* ── Progress Bar (admin) ────────────────── */

.progress-bar {
    background: #e5e7eb;
    border-radius: 8px;
    height: 20px;
    overflow: hidden;
}
.progress-fill {
    background: #2563eb;
    height: 100%;
    color: #fff;
    font-size: 0.7rem;
    line-height: 20px;
    text-align: center;
    min-width: 30px;
    border-radius: 8px;
}

/* ── Admin Table ─────────────────────────── */

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.admin-section { margin-bottom: 2rem; }

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.admin-table th,
.admin-table td {
    padding: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}
.admin-table th { font-weight: 600; background: #f9fafb; }
.admin-table .actions { white-space: nowrap; }
.admin-table .actions .btn { margin-right: 0.25rem; }

/* ── Entity Detail ───────────────────────── */

.entity-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
    color: #6b7280;
    font-size: 0.9rem;
}

.detail-section { margin-bottom: 1.5rem; }
.detail-section dl {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 0.25rem 1rem;
}
.detail-section dt { font-weight: 600; color: #6b7280; }
.detail-section dd { margin: 0; }

.text-muted { color: #6b7280; font-size: 0.85rem; }

/* ── Wizard Nav ──────────────────────────── */

.wizard-nav {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 30px;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

/* ── Responsive ──────────────────────────── */

@media (max-width: 768px) {
    .boost-wizard,
    .admin-container {
        margin: 10px;
        padding: 15px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .detail-section dl {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .dot-label { display: none; }
    .progress-dots::before {
        left: 10px;
        right: 10px;
    }
}

/* ── T-B-123: Zusammenfassung — Korrigieren-Buttons + Submit-CTA ───── */

.summary-section .section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 8px;
    margin: 0 0 12px 0;
}

.summary-section .section-header-row h3 {
    margin: 0;
    border-bottom: none;
    padding-bottom: 0;
    flex: 1;
}

.btn-correct {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #fff;
    border: 1px solid #2563eb;
    color: #2563eb;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}
.btn-correct:hover { background: #2563eb; color: #fff; }
.btn-correct:focus-visible { outline: 2px solid #1d4ed8; outline-offset: 2px; }

.submit-cta {
    margin-top: 30px;
    padding: 28px 24px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 2px solid #16a34a;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.12);
}
.submit-cta-icon {
    font-size: 36px;
    line-height: 1;
    margin-bottom: 8px;
    display: block;
}
.submit-cta h3 {
    margin: 0 0 10px 0;
    color: #15803d;
    font-size: 22px;
    font-weight: 700;
}
.submit-cta p {
    margin: 8px 0;
    color: #166534;
    font-size: 15px;
    line-height: 1.5;
}
.submit-cta .submit-cta-fineprint {
    font-size: 13px;
    color: #4b5563;
    margin-top: 12px;
}
.submit-cta .consulting-note {
    display: inline-block;
    margin-top: 14px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    font-size: 14px;
    color: #15803d;
    font-weight: 600;
}

@media (max-width: 600px) {
    .summary-section .section-header-row { flex-wrap: wrap; }
    .btn-correct { font-size: 11px; padding: 3px 8px; }
    .submit-cta { padding: 20px 16px; }
    .submit-cta h3 { font-size: 18px; }
}
