/* =============================================
   Manga Edit - Tags Input Component
   ============================================= */

.hmanhwa-edit-tags-container {
    margin-bottom: 20px;
}

.hmanhwa-edit-tags-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #f5f7f6;
}

.hmanhwa-edit-tags-label small {
    display: block;
    margin-top: 4px;
    font-weight: 400;
    color: #9fa7a3;
    font-size: 12px;
}

.hmanhwa-edit-search {
    position: relative;
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(9, 12, 18, 0.95);
    align-items: center;
    min-height: 44px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.hmanhwa-edit-search:focus-within {
    border-color: #b4ff3b;
    box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.2);
}

.hmanhwa-edit-search__input {
    flex: 1;
    min-width: 150px;
    padding: 0;
    border: none;
    background: transparent;
    color: #f5f7f6;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}

.hmanhwa-edit-search__input::placeholder {
    color: #9fa7a3;
}

.hmanhwa-edit-search__results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(9, 12, 18, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 10;
    display: none;
}

.hmanhwa-edit-search__results.active {
    display: block;
}

.hmanhwa-edit-search__result-item {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.12s ease;
}

.hmanhwa-edit-search__result-item:hover {
    background: rgba(var(--accent-rgb), 0.1);
}

.hmanhwa-edit-search__result-item:last-child {
    border-bottom: none;
}

.hmanhwa-edit-search__result-title {
    color: #f5f7f6;
    font-weight: 500;
}

.hmanhwa-edit-search__result-meta {
    font-size: 12px;
    color: #9fa7a3;
    margin-top: 4px;
}

/* Tags Display */
.hmanhwa-edit-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.hmanhwa-edit-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.15), rgba(var(--accent-rgb), 0.08));
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    border-radius: 6px;
    color: #b4ff3b;
    font-size: 13px;
    font-weight: 500;
}

.hmanhwa-edit-tag__name {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hmanhwa-edit-tag__remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: none;
    background: transparent;
    color: #b4ff3b;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: color 0.12s ease;
    flex-shrink: 0;
}

.hmanhwa-edit-tag__remove:hover {
    color: #ff6b6b;
}

/* Hidden input for form submission */
.hmanhwa-edit-tags-input {
    display: none;
}

/* Responsive */
@media (max-width: 640px) {
    .hmanhwa-edit-tags {
        gap: 6px;
    }

    .hmanhwa-edit-tag {
        padding: 5px 10px;
        font-size: 12px;
    }

    .hmanhwa-edit-tag__name {
        max-width: 120px;
    }

    .hmanhwa-edit-search__results {
        max-height: 200px;
    }
}
