/* ─────────────────────────────────────────────────────────────────────────────
   RECATOOLS — Sitemap Generator (RT-SEO-004)
   Tool-specific styles only — inherits from /assets/css/tool-page.css
───────────────────────────────────────────────────────────────────────────── */

/* ── URL add row ──────────────────────────────────────────────────────────── */

.sg-url-add-section {
    margin-bottom: 1.25rem;
}

.sg-url-input-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}

.sg-url-input {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border: 2px solid #E2E4E8;
    border-radius: 8px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.9375rem;
    color: var(--text-primary, #0D1B2A);
    background: #fafaf8;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.sg-url-input:focus {
    outline: none;
    border-color: #E8472F;
    background: #fff;
}

.sg-url-input::placeholder {
    color: #b0aca6;
}

.sg-url-meta-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.sg-meta-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary, #64748B);
    white-space: nowrap;
}

.sg-date-input {
    padding: 8px 12px;
    border: 2px solid #E2E4E8;
    border-radius: 8px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.875rem;
    color: var(--text-primary, #0D1B2A);
    background: #fafaf8;
    transition: border-color 0.15s;
    box-sizing: border-box;
    cursor: pointer;
}

.sg-date-input:focus {
    outline: none;
    border-color: #E8472F;
    background: #fff;
}

.sg-select {
    padding: 8px 12px;
    border: 2px solid #E2E4E8;
    border-radius: 8px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.875rem;
    color: var(--text-primary, #0D1B2A);
    background: #fafaf8;
    transition: border-color 0.15s;
    box-sizing: border-box;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b6760' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}

.sg-select:focus {
    outline: none;
    border-color: #E8472F;
    background-color: #fff;
}

.sg-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 10px 18px;
    background: #E8472F;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, opacity 0.15s;
    flex-shrink: 0;
}

.sg-add-btn:hover {
    background: #cf5524;
}

.sg-add-btn:active {
    opacity: 0.85;
}

/* ── Bulk Add collapsible ─────────────────────────────────────────────────── */

.sg-bulk-wrap {
    border: 1.5px solid #E2E4E8;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.sg-bulk-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fafaf8;
    cursor: pointer;
    user-select: none;
    border: none;
    width: 100%;
    text-align: left;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary, #0D1B2A);
    border-bottom: 1.5px solid transparent;
    transition: border-color 0.15s;
}

.sg-bulk-wrap.open .sg-bulk-toggle {
    border-bottom-color: #E2E4E8;
}

.sg-bulk-toggle-icon {
    font-size: 1.125rem;
    color: #E8472F;
    font-weight: 700;
    line-height: 1;
    transition: transform 0.2s;
}

.sg-bulk-wrap.open .sg-bulk-toggle-icon {
    transform: rotate(45deg);
}

.sg-bulk-panel {
    display: none;
    padding: 16px;
    background: #fff;
}

.sg-bulk-wrap.open .sg-bulk-panel {
    display: block;
}

.sg-bulk-textarea {
    width: 100%;
    min-height: 120px;
    padding: 10px 14px;
    border: 2px solid #E2E4E8;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875rem;
    color: var(--text-primary, #0D1B2A);
    background: #fafaf8;
    resize: vertical;
    transition: border-color 0.15s;
    box-sizing: border-box;
    margin-bottom: 0.75rem;
}

.sg-bulk-textarea:focus {
    outline: none;
    border-color: #E8472F;
    background: #fff;
}

.sg-bulk-textarea::placeholder {
    color: #b0aca6;
}

.sg-bulk-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 9px 18px;
    background: #E8472F;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.sg-bulk-add-btn:hover {
    background: #cf5524;
}

/* ── URL list table ──────────────────────────────────────────────────────── */

.sg-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sg-url-counter {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary, #64748B);
}

.sg-url-counter span {
    color: #E8472F;
}

.sg-clear-all-btn {
    padding: 5px 12px;
    border: 1.5px solid #d0cdc8;
    border-radius: 6px;
    background: #fff;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748B;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.sg-clear-all-btn:hover {
    border-color: #dc3545;
    color: #dc3545;
}

.sg-table-wrap {
    overflow-x: auto;
    border: 1.5px solid #E2E4E8;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.sg-url-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8375rem;
    font-family: 'IBM Plex Sans', sans-serif;
}

.sg-url-table thead th {
    background: #FFFFFF;
    padding: 9px 12px;
    text-align: left;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    color: var(--text-secondary, #64748B);
    text-transform: uppercase;
    border-bottom: 1.5px solid #E2E4E8;
    white-space: nowrap;
}

.sg-url-table thead th:last-child {
    text-align: center;
    width: 48px;
}

.sg-url-table tbody td {
    padding: 9px 12px;
    border-bottom: 1px solid #f0ede8;
    color: var(--text-primary, #0D1B2A);
    vertical-align: middle;
}

.sg-url-table tbody tr:last-child td {
    border-bottom: none;
}

.sg-url-table tbody tr:hover {
    background: #fdf9f7;
}

.sg-td-url {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8125rem;
    word-break: break-all;
    max-width: 320px;
}

.sg-td-action {
    text-align: center;
    width: 48px;
}

.sg-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1.5px solid #d0cdc8;
    border-radius: 6px;
    background: #fff;
    color: #64748B;
    font-size: 0.875rem;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.sg-delete-btn:hover {
    border-color: #dc3545;
    color: #dc3545;
    background: #fff5f5;
}

.sg-empty-state {
    padding: 24px;
    text-align: center;
    color: #b0aca6;
    font-size: 0.9rem;
    font-style: italic;
}

/* ── Action buttons row ──────────────────────────────────────────────────── */

.sg-actions-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.sg-generate-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 11px 22px;
    background: #E8472F;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
}

.sg-generate-btn:hover {
    background: #cf5524;
}

.sg-download-btn,
.sg-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 11px 20px;
    background: #fff;
    color: var(--text-primary, #0D1B2A);
    border: 2px solid #d0cdc8;
    border-radius: 8px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.sg-download-btn:hover,
.sg-copy-btn:hover {
    border-color: #E8472F;
    color: #E8472F;
}

.sg-copy-btn.copied {
    border-color: #28a745;
    color: #28a745;
}

/* ── XML Preview panel ───────────────────────────────────────────────────── */

.sg-preview-section {
    margin-top: 0.25rem;
}

.sg-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sg-preview-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary, #0D1B2A);
}

.sg-preview-sub {
    font-size: 0.8rem;
    color: var(--muted, #64748B);
}

.sg-xml-textarea {
    width: 100%;
    min-height: 260px;
    max-height: 480px;
    padding: 14px 16px;
    border: 2px solid #E2E4E8;
    border-radius: 10px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.825rem;
    line-height: 1.6;
    color: #0D1B2A;
    background: #FFFFFF;
    resize: vertical;
    box-sizing: border-box;
    overflow-y: auto;
}

.sg-xml-textarea:focus {
    outline: none;
    border-color: #E8472F;
}

/* ── Limit note ──────────────────────────────────────────────────────────── */

.sg-limit-note {
    margin-top: 1rem;
    padding: 10px 14px;
    background: #fff8f0;
    border: 1.5px solid #f5c6a0;
    border-radius: 8px;
    font-size: 0.8125rem;
    color: #7a4520;
    line-height: 1.5;
}

.sg-limit-note strong {
    color: #E8472F;
}

/* ── Toast notification ──────────────────────────────────────────────────── */

.sg-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #0D1B2A;
    color: #fff;
    padding: 10px 22px;
    border-radius: 8px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 9999;
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
    pointer-events: none;
    white-space: nowrap;
}

.sg-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ── Validation error ────────────────────────────────────────────────────── */

.sg-error-msg {
    font-size: 0.825rem;
    color: #dc3545;
    margin-top: 0.3rem;
    min-height: 1.2em;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .sg-url-meta-row {
        gap: 0.4rem;
    }

    .sg-meta-label {
        width: 100%;
    }

    .sg-select,
    .sg-date-input {
        font-size: 0.8125rem;
    }

    .sg-actions-row {
        flex-direction: column;
        align-items: stretch;
    }

    .sg-generate-btn,
    .sg-download-btn,
    .sg-copy-btn {
        justify-content: center;
        width: 100%;
    }

    .sg-td-url {
        max-width: 180px;
    }

    .sg-url-table thead th:nth-child(2),
    .sg-url-table tbody td:nth-child(2) {
        display: none;
    }
}

/* cache-buster: 2026-05-24T05:06:05Z */
