/* sitemap-generator-style.css */

.tool-header {
    text-align: center;
    padding: 40px 20px;
    background-color: var(--white-color);
    border-bottom: 1px solid var(--border-color);
}

.tool-header h1 {
    margin: 0;
    font-size: 32px;
}

.tool-container {
    background-color: var(--white-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    max-width: 1200px;
    margin: 40px auto;
}

.sitemap-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
}

.control-panel h3 {
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 20px;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-sizing: border-box;
}

.tool-btn {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: 500;
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 20px 0;
}

.save-load-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tool-btn-secondary {
    padding: 8px 15px;
    font-size: 14px;
    background-color: var(--light-text-color);
    color: var(--white-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.load-group {
    display: flex;
    gap: 5px;
}

.load-group select {
    flex-grow: 1;
    padding: 8px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.delete-project-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0 10px;
    cursor: pointer;
}

.export-btn {
    background-color: #28a745;
}


/* --- サイトマップツリーのスタイル --- */
.sitemap-display {
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 8px;
    background-color: var(--bg-color);
    overflow-x: auto;
}

.tree ul {
    padding-left: 20px;
    position: relative;
    list-style: none;
}

.tree ul ul {
    margin-left: 10px;
}

.tree li {
    position: relative;
    padding: 5px 0;
}

.tree li::before,
.tree li::after {
    content: '';
    position: absolute;
    left: -15px;
}

.tree li::before {
    border-top: 1px solid #ccc;
    top: 22px;
    width: 10px;
    height: 0;
}

.tree li::after {
    border-left: 1px solid #ccc;
    height: 100%;
    width: 0px;
    top: 0;
}

.tree li:last-child::after {
    height: 22px;
}

.tree>ul>li::before,
.tree>ul>li::after {
    display: none;
}

.node-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--white-color);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 4px;
    min-width: 200px;
    max-width: 450px;
    /* ★★★ 修正点 ★★★ */
}

.node-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.node-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.node-url {
    font-size: 12px;
    color: var(--light-text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.node-actions .delete-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 10px;
    cursor: pointer;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s;
}

.node-content:hover .delete-btn {
    visibility: visible;
    opacity: 1;
}

.other-branch>span {
    font-weight: bold;
    color: var(--primary-color);
}