/* My Reports overlay (footer "Meine Berichte" / "My Reports") */

.advisor-my-reports-overlay {
    position: fixed;
    inset: 0;
    z-index: 210000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.advisor-my-reports-overlay[hidden] {
    display: none !important;
}

.advisor-my-reports-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
}

.advisor-my-reports-panel {
    position: relative;
    z-index: 1;
    width: min(640px, 100%);
    max-height: min(88vh, 720px);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #0f172a;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
    font-size: 15px;
}

.advisor-my-reports-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    flex-shrink: 0;
}

.advisor-my-reports-panel__title {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.35;
    color: #0a192f;
}

.advisor-my-reports-panel__refresh {
    flex-shrink: 0;
    min-height: 36px;
    padding: 0.35rem 0.85rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #0a192f;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.advisor-my-reports-panel__refresh:hover:not(:disabled) {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.advisor-my-reports-panel__refresh:disabled {
    opacity: 0.65;
    cursor: wait;
}

.advisor-my-reports-panel__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem 1.15rem;
    -webkit-overflow-scrolling: touch;
}

.advisor-my-reports-panel__footer {
    flex-shrink: 0;
    padding: 0.75rem 1.15rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #e2e8f0;
    background: #fff;
    display: flex;
    justify-content: flex-end;
}

.advisor-my-reports-panel__btn {
    min-height: 40px;
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 10px;
    background: #0a192f;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.advisor-my-reports-panel__btn:hover {
    background: #112240;
}

.advisor-my-reports__loading {
    margin: 0.5rem 0;
    color: #64748b;
    font-size: 0.9rem;
}

.advisor-my-reports__empty {
    text-align: center;
    padding: 1.25rem 0.5rem;
}

.advisor-my-reports__empty-title {
    margin: 0 0 0.45rem;
    font-size: 1rem;
    font-weight: 700;
    color: #0a192f;
}

.advisor-my-reports__empty-text {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #475569;
}

.advisor-my-reports__empty-hint {
    margin: 0 0 0.75rem;
    font-size: 0.8125rem;
    color: #64748b;
}

.advisor-my-reports__empty-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.25rem;
}

.advisor-my-reports__btn {
    min-height: 40px;
    padding: 0.5rem 1.1rem;
    border: none;
    border-radius: 10px;
    background: #0a192f;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.advisor-my-reports__btn--secondary {
    background: #fff;
    color: #0a192f;
    border: 1px solid #cbd5e1;
}

.advisor-my-reports__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.advisor-my-reports__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.advisor-my-reports__item-main {
    min-width: 0;
    flex: 1 1 auto;
}

.advisor-my-reports__item-title {
    margin: 0 0 0.25rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: #0a192f;
    word-break: break-word;
}

.advisor-my-reports__item-meta {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.4;
    color: #64748b;
}

.advisor-my-reports__dl {
    flex-shrink: 0;
    min-height: 36px;
    padding: 0.4rem 0.75rem;
    border: none;
    border-radius: 8px;
    background: #0a192f;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.advisor-my-reports__dl:hover:not(:disabled) {
    background: #112240;
}

.advisor-my-reports__dl:disabled {
    opacity: 0.7;
    cursor: wait;
}

@media (max-width: 768px) {
    .advisor-my-reports-overlay {
        padding: 0;
        align-items: stretch;
    }

    .advisor-my-reports-panel {
        width: 100%;
        max-height: 100vh;
        max-height: 100dvh;
        border-radius: 0;
    }

    .advisor-my-reports__item {
        flex-direction: column;
        align-items: stretch;
    }

    .advisor-my-reports__dl {
        width: 100%;
    }
}

.advisor-my-reports__item--highlight {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.advisor-my-reports__item--test {
    border-color: #fcd34d;
    background: #fffbeb;
}

.advisor-my-reports__item-actions {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex-shrink: 0;
}

.advisor-my-reports__dl--text {
    background: #334155;
}

.advisor-my-reports__tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #0f766e;
    background: #ecfdf5;
    border: 1px solid #99f6e4;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    align-self: flex-start;
}

.advisor-my-reports-text-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
}

.advisor-my-reports-text-overlay__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.advisor-my-reports-text-overlay__panel {
    position: relative;
    z-index: 1;
    width: min(560px, 100%);
    max-height: min(70vh, 520px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.advisor-my-reports-text-overlay__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.advisor-my-reports-text-overlay__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0a192f;
}

.advisor-my-reports-text-overlay__close {
    border: none;
    background: transparent;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
    padding: 0.15rem 0.35rem;
}

.advisor-my-reports-text-overlay__body {
    margin: 0;
    padding: 1rem;
    overflow: auto;
    font: 0.8125rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    white-space: pre-wrap;
    word-break: break-word;
    color: #0f172a;
}

.advisor-my-reports__item-status {
    margin: 0.25rem 0 0;
    font-size: 0.8125rem;
    color: #64748b;
}

.advisor-my-reports__status {
    font-size: 0.875rem;
    color: #475569;
    white-space: nowrap;
}

.advisor-report-toast {
    position: fixed;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 220000;
    max-width: min(92vw, 420px);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: #0f172a;
    color: #f8fafc;
    font-size: 0.9375rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    align-items: stretch;
}

.advisor-report-toast__message {
    margin: 0;
    line-height: 1.45;
}

.advisor-report-toast__support,
.advisor-report-support-btn,
.advisor-pdf-card__support {
    min-height: 36px;
    padding: 0.45rem 0.85rem;
    border: 1px solid rgba(248, 250, 252, 0.35);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.advisor-my-reports__btn.advisor-report-support-btn,
.advisor-pdf-card__support {
    border-color: #cbd5e1;
    background: #fff;
    color: #0a192f;
}

.advisor-report-toast--error {
    background: #991b1b;
}

.advisor-report-toast--error .advisor-report-toast__support {
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.15);
}
