/* ========================================
   ARTICLE-PROCEDURE STYLES
   
   Styles für Schritt-für-Schritt-Anleitungen innerhalb von Artikeln.
   Diese werden dynamisch vom TipTap-Editor generiert und sind Teil
   des .article-content Containers (MarkupString aus der Datenbank).
   
   Hinweis: Diese Datei ist aus Gründen der Übersichtlichkeit separiert,
   gehört aber konzeptionell zu article-content.css.
   ======================================== */

.procedure {
    background: var(--surface-colors-background-base, #ffffff);
    border: 1px solid var(--border-colors-border-subtle, #e0e0e0);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.procedure__header {
    margin-bottom: 1.5rem;
}

.procedure__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-colors-general-text-default, #1a1a1a);
    margin: 0 0 0.5rem 0;
}

.procedure__description {
    font-size: 1rem;
    color: var(--text-colors-general-text-subtle, #666);
    margin: 0;
}

.procedure__steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.procedure-step {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    padding: 1rem 1rem 1rem 0.5rem;
    margin: -1rem -1rem -1rem -0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: default;
}

.procedure-step:hover {
    background: var(--surface-colors-background-subtle, #f8f9fa);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateX(2px);
}

.procedure-step__number {
    background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
    color: white;
    width: 3rem;
    height: 3rem;
    min-width: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.35rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
    position: relative;
    z-index: 1;
}

.procedure-step__number::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.procedure-step:hover .procedure-step__number::before {
    opacity: 0.3;
}

.procedure-step__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.procedure-step__title {
    font-size: 1.15rem;
    font-weight: 700;  /* Von 600 auf 700 erhöht → gleich fett wie Procedure-Titel */
    color: var(--text-colors-general-text-default, #1a1a1a);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.procedure-step__badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-primary, #0066cc);
    background: var(--surface-colors-background-subtle, #f0f8ff);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.procedure-step__text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-colors-general-text-default, #1a1a1a);
}

.procedure-step__text p {
    margin: 0 0 0.5rem 0;
}

.procedure-step__text p:last-child {
    margin-bottom: 0;
}

.procedure-step__hint {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--surface-colors-background-warning, #fff8e1);
    border-left: 3px solid var(--color-warning, #ff9800);
    border-radius: 4px;
    font-size: 0.95rem;
    color: var(--text-colors-general-text-default, #1a1a1a);
}

.procedure-step__link {
    font-size: 0.95rem;
}

.procedure-step__link a {
    color: var(--color-primary, #0066cc);
    text-decoration: none;
    font-weight: 500;
}

.procedure-step__link a:hover {
    text-decoration: underline;
}

.procedure-step__image {
    margin-top: 0.5rem;
}

.procedure-step__image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid var(--border-colors-border-subtle, #e0e0e0);
}

/* Procedure Step Image Thumbnail */
.procedure-step__thumbnail,
.article-content .procedure-step__thumbnail {
    max-width: 80px !important;
    max-height: 60px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    border: 2px solid #dee2e6 !important;
    border-radius: 4px !important;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    display: inline-block !important;
    vertical-align: middle;
    cursor: pointer !important;
}

.procedure-step__thumbnail:hover {
    border-color: #0d6efd;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.2);
    transform: scale(1.02);
}

.procedure-step__thumbnail:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* Image Overlay */
.procedure-image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.procedure-image-overlay__container {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.procedure-image-overlay__close {
    position: absolute;
    top: 0rem;
    right: 0rem;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    color: #212529;
    transition: background 0.2s ease;
    z-index: 10001;
}

.procedure-image-overlay__close:hover {
    background: rgba(255, 255, 255, 1);
}

.procedure-image-overlay__image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0, 0, 0.5);
}

.procedure-error {
    background: var(--surface-colors-background-error, #ffebee);
    border: 1px solid var(--color-error, #d32f2f);
    color: var(--color-error, #d32f2f);
    padding: 1rem;
    border-radius: 4px;
    font-weight: 600;
    margin: 1rem 0;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .procedure {
        padding: 1rem;
    }

    .procedure-step {
        gap: 1rem;
        padding: 0.75rem 0.75rem 0.75rem 0.25rem;
        margin: -0.75rem -0.75rem -0.75rem -0.25rem;
    }

    .procedure-step__number {
        width: 2.5rem;
        height: 2.5rem;
        min-width: 2.5rem;
        font-size: 1.1rem;
        box-shadow: 0 3px 8px rgba(25, 118, 210, 0.25);
    }

    .procedure__title {
        font-size: 1.25rem;
    }
}

/* ========================================
   DARK MODE
   ======================================== */

html[etask-color-mode="dark"] {
    .procedure {
        background: var(--surface-colors-background-base, #1e1e1e);
        border-color: var(--border-colors-border-subtle, #404040);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }

    .procedure__title {
        color: var(--text-colors-general-text-default, #e0e0e0);
    }

    .procedure__description {
        color: var(--text-colors-general-text-subtle, #b0b0b0);
    }

    .procedure-step:hover {
        background: var(--surface-colors-background-hover, #2a2a2a);
    }

    .procedure-step__title {
        color: var(--text-colors-general-text-default, #e0e0e0);
    }

    .procedure-step__text {
        color: var(--text-colors-general-text-default, #d0d0d0);
    }

    .procedure-step__hint {
        background: var(--surface-colors-background-subtle, #2a2a2a);
        border-color: var(--border-colors-border-subtle, #404040);
        color: var(--text-colors-general-text-subtle, #b0b0b0);
    }

    .procedure-step__link a {
        color: var(--text-colors-general-text-link, #4a9eff);
    }

    .procedure-step__image img {
        border-color: var(--border-colors-border-subtle, #404040);
    }

    .procedure-error {
        background: var(--surface-colors-background-error, #3a1a1a);
        border-color: var(--color-error, #ff5252);
        color: var(--color-error, #ff8a80);
    }
}

