/* Category Explorer Widget */
.explorer-container {
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 4px;
    height: 400px;
    display: flex;
    flex-direction: column;
}

.explorer-search {
    padding: 10px;
    border-bottom: 1px solid #eee;
    background: #f9f9f9;
}

.explorer-search input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.explorer-tree {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    list-style: none;
    margin: 0;
}

/* Tree Items */
.tree-item {
    margin-bottom: 4px;
    position: relative;
}

.tree-row {
    display: flex;
    align-items: center;
    padding: 2px 0;
}

.tree-toggle {
    cursor: pointer;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 12px;
    user-select: none;
    transition: transform 0.1s;
}

.tree-toggle:hover { color: #000; font-weight: bold; }
.tree-toggle.expanded { transform: rotate(90deg); }
.tree-toggle.empty { opacity: 0; cursor: default; }

.tree-checkbox { margin: 0 8px 0 4px; }

.tree-label {
    cursor: pointer;
    font-size: 14px;
}
.tree-label:hover { text-decoration: underline; }

/* Subtree indentation */
.tree-children {
    list-style: none;
    margin: 0;
    padding-left: 22px;
    display: none; /* Hidden by default */
    border-left: 1px solid #eee;
}

.tree-children.visible { display: block; }
.selected-area {
    padding: 10px;
    background: #f0f7ff;
    border-bottom: 1px solid #dae1e7;
    display: none; /* Hidden when empty */
    flex-wrap: wrap;
    gap: 8px;
    max-height: 100px;
    overflow-y: auto;
}

.selected-area.has-items {
    display: flex;
}

.selected-tag {
    background: #007bff;
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.remove-tag {
    cursor: pointer;
    font-weight: bold;
    opacity: 0.7;
}

.remove-tag:hover {
    opacity: 1;
}
.step-box {
    background: #f8f9fa;
    border: 1px solid #ddd;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
}
.code-block {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: monospace;
    margin-top: 10px;
}
#manifest-result {
    display: none;
    margin-top: 20px;
    padding: 15px;
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 5px;
}
.btn-generate {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}
.btn-generate:hover { background-color: #0056b3; }
.btn-download-json {
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
    margin-top: 10px;
}
/* Container for the whole box */
.code-wrapper {
    position: relative;
    background: #f4f4f4;
    border-radius: 4px;
    border: 1px solid #ddd;
    margin-top: 10px;
}

/* The actual text area */
.code-wrapper pre {
    padding: 16px;
    overflow: auto;
    margin: 0;
    font-family: monospace;
}

/* The button styling */
.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 6px;
    background: transparent;
    border: 1px solid rgba(27, 31, 36, 0.15);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    color: #57606a;
    z-index: 10;
}

.copy-btn:hover {
    background-color: #e0e0e0;
    border-color: rgba(27, 31, 36, 0.5);
}

.copy-btn svg {
    fill: currentColor;
    width: 16px;
    height: 16px;
}
