/* ===== Report embed ===== */
.m21-report-embed-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}
.m21-report-embed-container iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100% !important;
    height: 100% !important;
}
.m21-empty-state { text-align: center; color: #999; padding: 40px; }

/* ===== Modal (shared) ===== */
.m21-modal {
    display: none; position: fixed; z-index: 9999; inset: 0;
    background: rgba(0,0,0,0.6);
    overflow-y: scroll; -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 40px 0; box-sizing: border-box;
    justify-content: center; align-items: flex-start;
}
.m21-modal-content {
    background: #fff; border-radius: 5px; width: 90%;
    position: relative; flex-shrink: 0;
}
.m21-modal-content--logbook { max-width: 800px; padding: 40px; }
.m21-modal-content--service {
    max-width: 900px; width: 95%; height: 85vh;
    display: flex; flex-direction: column; overflow: hidden; padding: 0;
}
.m21-modal-close { position: absolute; font-size: 24px; cursor: pointer; }
.m21-modal-content--logbook .m21-modal-close { top: 15px; right: 20px; color: #999; }
.m21-modal-content--service .m21-modal-close {
    top: 12px; right: 16px; color: #fff; background: rgba(0,0,0,0.4);
    border: none; line-height: 1; border-radius: 50%; width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center; z-index: 10;
}
.m21-modal-content--service .m21-modal-close:hover { background: rgba(0,0,0,0.65); }
.m21-modal-iframe { width: 100%; flex: 1; border: none; display: block; border-radius: 5px; }

/* ===== Timeline ===== */
.m21-timeline { position: relative; padding: 10px 0; list-style: none; }
.m21-timeline::before { content: ''; position: absolute; top: 0; bottom: 0; left: 15px; width: 2px; background: #30b5ae; }
.m21-log-card {
    position: relative; margin-left: 40px; margin-bottom: 30px; background: #fff;
    padding: 20px; border-radius: 5px; border: 1px solid #f0f0f0; cursor: pointer;
    transition: transform 0.2s; box-shadow: 5px 5px 25px 0px #00000015;
    display: flex; justify-content: space-between; align-items: center;
}
.m21-log-card:hover { transform: translateY(-2px); box-shadow: 5px 5px 25px 0px #00000030; }
.m21-log-card--last { margin-bottom: 0; }
.m21-timeline-dot {
    position: absolute; left: -33px; top: 22px; width: 16px; height: 16px;
    border-radius: 50%; background: #051f24; border: 4px solid #f7f6f5; z-index: 1;
}
.m21-log-card-body { flex: 1; }
.m21-log-card-meta { font-size: 0.85rem; color: #888; margin-bottom: 5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.m21-log-card-title { margin: 0 0 8px 0; }
.m21-log-card-excerpt { margin: 0; color: #666; font-size: 0.95rem; }
.m21-log-card-chevron { margin-left: 20px; color: #ccc; font-size: 1.5rem; }
.m21-log-modal-meta { font-size: 0.9rem; color: #888; margin-bottom: 4px; }
.m21-log-modal-title { margin: 6px 0 8px 0; }
.m21-log-modal-body { line-height: 1.6; color: #333; }

/* ===== Pagination ===== */
.m21-pagination-container { margin-left: 40px; margin-top: 20px; }
.m21-pagination { display: flex; gap: 8px; flex-wrap: wrap; }
.m21-pagination a, .m21-pagination span {
    padding: 10px 18px; border-radius: 5px; border: 1px solid #eee;
    background: #fff; text-decoration: none; color: #051f24; font-weight: 600;
    transition: all 0.2s;
}
.m21-pagination a:hover { border-color: #30b5ae; color: #30b5ae; }
.m21-pagination .current { background: #30b5ae; color: #fff; border-color: #30b5ae; }

/* ===== Reactions ===== */
.m21-card-reactions { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #f0f0f0; }
.m21-like-btn { background: none; border: 1px solid #e0e0e0; border-radius: 50px; padding: 4px 12px; cursor: pointer; font-size: 0.85rem; color: #888; display: inline-flex; align-items: center; gap: 5px; transition: all 0.2s; }
.m21-like-btn:hover, .m21-like-btn.m21-liked { border-color: #e74c3c; color: #e74c3c; background: #fff0f0; }
.m21-comment-count-badge { font-size: 0.85rem; color: #888; display: inline-flex; align-items: center; gap: 5px; }
.m21-modal-reactions { display: flex; align-items: center; padding: 15px 0; border-top: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0; margin: 20px 0; }

/* ===== Comments ===== */
.m21-comments-title { font-size: 1rem; font-weight: 600; color: #051f24; margin: 0 0 15px 0; }
.m21-comment { background: #f7f6f5; border-radius: 5px; padding: 12px 15px; margin-bottom: 10px; }
.m21-comment--reply { margin-left: 20px; background: #f0fffe; border-left: 3px solid #30b5ae; }
.m21-comment-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.m21-comment-author { font-weight: 600; font-size: 0.9rem; color: #051f24; }
.m21-staff-badge { background: #30b5ae; color: #fff; font-size: 0.7rem; padding: 2px 6px; border-radius: 50px; margin-left: 6px; font-weight: 600; }
.m21-comment-date { font-size: 0.8rem; color: #aaa; }
.m21-comment-body { font-size: 0.9rem; color: #444; line-height: 1.5; margin: 0; }
.m21-reply-btn { background: none; border: none; color: #30b5ae; cursor: pointer; font-size: 0.8rem; padding: 4px 0; margin-top: 5px; display: block; font-weight: 600; }
.m21-reply-btn:hover { text-decoration: underline; }
.m21-reply-indicator { font-size: 0.85rem; color: #30b5ae; margin-bottom: 6px; display: block; font-weight: 600; min-height: 1.2em; }
.m21-comment-textarea { width: 100%; min-height: 80px; border: 1px solid #e0e0e0; border-radius: 5px; padding: 10px; font-size: 0.9rem; resize: vertical; box-sizing: border-box; font-family: inherit; color: #333; }
.m21-comment-textarea:focus { outline: none; border-color: #30b5ae; }
.m21-comment-form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.m21-cancel-reply-btn { display: none; background: none; border: 1px solid #ddd; border-radius: 5px; padding: 7px 15px; cursor: pointer; font-size: 0.85rem; color: #666; }
.m21-submit-comment-btn { background: #051f24; color: #fff; border: none; border-radius: 5px; padding: 7px 20px; cursor: pointer; font-size: 0.85rem; font-weight: 600; transition: background 0.2s; }
.m21-submit-comment-btn:hover { background: #30b5ae; }
.m21-submit-comment-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ===== New badge ===== */
.m21-new-badge {
    display: inline-block; background: #30b5ae; color: #fff;
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em;
    padding: 2px 8px; border-radius: 50px; vertical-align: middle;
    margin-left: 5px; line-height: 1.6;
}

/* ===== Latest entry ===== */
.m21-latest-entry {
    background: #fff; padding: 25px; border-radius: 5px;
    border: 1px solid #f0f0f0; box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.m21-latest-meta { font-size: 0.85rem; color: #888; margin-bottom: 8px; display: block; }
.m21-latest-title { margin: 0 0 12px 0; font-size: 1.3rem; color: #051f24; font-weight: 700; }
.m21-latest-content { line-height: 1.6; color: #444; font-size: 1rem; }

/* ===== Active services ===== */
.m21-active-services-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
@keyframes m21-btn-bounce {
    0%   { transform: scale(1)    translateY(0); }
    30%  { transform: scale(1.07) translateY(-6px); }
    60%  { transform: scale(1.03) translateY(-3px); }
    100% { transform: scale(1)    translateY(0); }
}
.m21-service-tag-btn {
    display: inline-flex; align-items: center; gap: 6px;
    color: #f7f6f5; padding: 9px 12px; border-radius: 50px;
    font-size: calc(0.85rem + 4px); font-weight: 600; margin: 0;
    cursor: pointer; border: none; font-family: inherit;
}
.m21-service-tag-btn:hover { animation: m21-btn-bounce 0.45s ease; }
.m21-service-tag {
    display: inline-block; color: #f7f6f5; padding: 6px 15px;
    border-radius: 50px; font-size: calc(0.85rem + 4px); font-weight: 600;
    border: none; margin: 3px 5px 3px 0;
}

/* ===== Drive links ===== */
.m21-drives-grid { display: flex; flex-wrap: wrap; gap: 12px; margin: 10px 0; }
.m21-drive-card {
    display: flex; align-items: center; gap: 12px;
    background: #fff; border: 1px solid #f0f0f0; border-radius: 5px;
    padding: 14px 20px; text-decoration: none; color: #051f24;
    box-shadow: 5px 5px 25px 0px #00000015; transition: transform 0.2s, box-shadow 0.2s;
    min-width: 160px;
}
.m21-drive-card:hover { transform: translateY(-2px); box-shadow: 5px 5px 25px 0px #00000030; }
.m21-drive-icon { color: #30b5ae; flex-shrink: 0; display: flex; }
.m21-drive-label { font-weight: 600; font-size: calc(0.95rem + 2px); flex: 1; }
.m21-drive-arrow { color: #aaa; display: flex; }
.m21-drive-card:hover .m21-drive-arrow { color: #30b5ae; }

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .m21-modal { padding: 20px 0; }
    .m21-modal-content--logbook { padding: 20px; }
    .m21-service-tag { font-size: calc(0.725rem + 4px) !important; }
    .m21-service-tag-btn { font-size: calc(0.725rem + 4px) !important; }
    .m21-timeline { padding-left: 0; margin-left: 0; }
    .m21-timeline::before { left: 8px; }
    .m21-log-card { margin-left: 24px; }
    .m21-timeline-dot { left: -24px; }
    .m21-pagination-container { margin-left: 24px; }
    .m21-drive-card { width: 100%; min-width: unset; box-sizing: border-box; }
    .m21-desktop-only { display: none; }
    .m21-staff-card { flex: 1 1 100%; }
}

/* --- Medarbetarkort --- */
.m21-staff-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.m21-staff-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    padding: 18px 20px;
    flex: 1 1 220px;
    min-width: 0;
    transition: transform .15s ease, box-shadow .15s ease;
}
.m21-staff-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
}
.m21-staff-avatar { flex-shrink: 0; }
.m21-staff-avatar img,
.m21-staff-initials {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
.m21-staff-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #30b5ae;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
}
.m21-staff-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.m21-staff-name {
    font-weight: 700;
    color: #051f24;
    font-size: .95rem;
}
.m21-staff-presentation {
    font-size: .8rem;
    color: #888;
    line-height: 1.4;
}
.m21-staff-contact {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 6px;
}
.m21-staff-link {
    font-size: .82rem;
    color: #30b5ae;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    word-break: break-all;
}
.m21-staff-link:hover { text-decoration: underline; }
.m21-staff-link-icon {
    font-size: .85rem;
    flex-shrink: 0;
}
