/* Jodit Plugin: Template-Popup (insertTemplate) */

.oo-template-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.oo-template-modal {
    background: #fff;
    border-radius: 10px;
    padding: 0;
    width: 780px;
    max-width: 94vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.oo-template-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.oo-template-header-title {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

.oo-template-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    color: #64748b;
    padding: 0 2px;
}

    .oo-template-close:hover {
        color: #1e293b;
    }

.oo-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
    padding: 20px;
    overflow-y: auto;
}

.oo-template-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

    .oo-template-card:hover {
        border-color: #3b82f6;
        box-shadow: 0 2px 12px rgba(59, 130, 246, 0.15);
    }

.oo-template-preview {
    height: 130px;
    overflow: hidden;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .oo-template-preview img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.oo-template-iframe {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
}

.oo-template-text {
    padding: 10px 12px;
}

.oo-template-title {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
    margin-bottom: 2px;
}

.oo-template-desc {
    font-size: 11px;
    color: #64748b;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 520px) {
    .oo-template-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   Inhalts-Boxen (Info, Warnung, Erfolg, Fehler)
   Werden sowohl im Editor als auch in der Detail-Ansicht gerendert.
   ========================================================= */

.oo-box-info,
.oo-box-warnung,
.oo-box-erfolg,
.oo-box-fehler {
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 4px solid;
    margin: 1rem 0;
}

.oo-box-info {
    background: #eff6ff;
    border-left-color: #3b82f6;
}

.oo-box-warnung {
    background: #fefce8;
    border-left-color: #eab308;
}

.oo-box-erfolg {
    background: #f0fdf4;
    border-left-color: #22c55e;
}

.oo-box-fehler {
    background: #fef2f2;
    border-left-color: #ef4444;
}
