/* Badge colors are generated from BADGE_COLORS in config.php — see render_badge_css() */

/* Inline dropdown (custom badge picker) */
.table-responsive { overflow: visible; }

.inline-dropdown {
    position: relative;
    display: inline-block;
}
.inline-dropdown-toggle {
    cursor: pointer;
}
.inline-dropdown-toggle::after {
    content: '';
    display: inline-block;
    vertical-align: 0.15em;
    margin-left: 0.35em;
    border-top: 0.35em solid currentColor;
    border-right: 0.25em solid transparent;
    border-left: 0.25em solid transparent;
}
.inline-dropdown-toggle:hover {
    opacity: 0.85;
}
.inline-dropdown-menu {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    margin-top: 0.25rem;
    padding: 0.25rem;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
    white-space: nowrap;
}
.inline-dropdown-menu.open {
    display: flex !important;
    gap: 0.25rem;
}
.inline-dropdown-item {
    cursor: pointer;
}
.inline-dropdown-item:hover {
    opacity: 0.8;
}

.description-text {
    line-height: 1.6;
}
.description-text h3,
.description-text h4,
.description-text h5 {
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
}
.description-text h3:first-child,
.description-text h4:first-child,
.description-text h5:first-child {
    margin-top: 0;
}
.description-text ul,
.description-text ol {
    margin-bottom: 0.25rem;
}
.fmt-toolbar .btn {
    min-width: 2.2rem;
}

.table th a {
    color: inherit;
}

/* Comments */
.comment {
    padding: 0.75rem 0;
    border-bottom: 1px solid #dee2e6;
}
.comment:last-child {
    border-bottom: none;
}
.comment-actions {
    opacity: 0;
    transition: opacity 0.15s;
}
.comment:hover .comment-actions {
    opacity: 1;
}
.comment-deleted-notice {
    padding: 0.5rem 0;
    color: #6c757d;
    font-style: italic;
}

/* Attachments */
.attachment-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #dee2e6;
}
.attachment-item:last-child {
    border-bottom: none;
}
.attachment-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.file-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
}
.file-icon-pdf { background: #dc3545; }
.file-icon-audio { background: #6f42c1; font-size: 1.1rem; }
.file-icon-video { background: #0d6efd; font-size: 1rem; }
.file-icon-doc { background: #0a8fa8; }
.file-icon-image { background: #20c997; font-size: 1.1rem; }
.file-icon-text { background: #6c757d; }
.attachment-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.attachment-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.85rem;
}
.attachment-meta {
    font-size: 0.75rem;
    color: #6c757d;
}
.attachment-delete {
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.15s;
    padding: 0.15rem 0.4rem;
    line-height: 1;
}
.attachment-item:hover .attachment-delete {
    opacity: 1;
}
/* Drop zone */
.dropzone {
    border: 2px dashed #adb5bd;
    border-radius: 0.375rem;
    padding: 1.25rem 1rem;
    text-align: center;
    transition: border-color 0.15s, background-color 0.15s;
    background-color: #f8f9fa;
}
.dropzone:hover,
.dropzone-active {
    border-color: #0d6efd;
    background-color: #e8f0fe;
}
.dropzone-icon {
    font-size: 1.5rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}
.dropzone-active .dropzone-icon {
    color: #0d6efd;
}
.dropzone-text {
    color: #495057;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}
.dropzone-btn {
    display: inline-block;
    padding: 0.3rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #fff;
    background-color: #0d6efd;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
}
.dropzone-btn:hover {
    background-color: #0b5ed7;
}
.dropzone-hint {
    color: #adb5bd;
    font-size: 0.7rem;
    margin-top: 0.4rem;
}

/* Create form file list */
.create-file-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    position: relative;
}
.create-file-item .attachment-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.create-file-item .attachment-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.create-file-item .attachment-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.create-file-item .attachment-delete {
    flex-shrink: 0;
    padding: 0.15rem 0.4rem;
    line-height: 1;
    opacity: 1;
}
