/**
 * ConvMaster - Sitemap Generator Styles v1.0
 * 
 * @package    ConvMaster
 * @version    1.0.0
 */

/* =====================================================
   TOOL PAGE LAYOUT
   ===================================================== */
.tool-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tool-header__icon {
    font-size: 2.5rem;
}

.tool-header__icon .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    background: var(--bg-tertiary);
    font-size: 2rem;
}

.tool-header__icon .icon--teal {
    background: rgba(20, 184, 166, 0.15);
    color: #14b8a6;
}

.tool-header__text h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: var(--text-primary);
}

.tool-header__text p {
    margin: 0;
    color: var(--text-secondary);
}

/* =====================================================
   FORMAT BADGES
   ===================================================== */
.format-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.format-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius-sm);
}

.format-badge--xml {
    background: rgba(20, 184, 166, 0.15);
    color: #14b8a6;
}

.format-badge--seo {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.format-badge--dev {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

/* =====================================================
   SITEMAP GENERATOR WIDGET
   ===================================================== */
.sitemap-generator {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* =====================================================
   MODE TABS
   ===================================================== */
.sitemap-generator__tabs {
    display: flex;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
}

.sitemap-tab {
    flex: 1;
    min-width: max-content;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    white-space: nowrap;
}

.sitemap-tab:hover {
    color: var(--text-primary);
    background: rgba(20, 184, 166, 0.05);
}

.sitemap-tab--active {
    color: #14b8a6;
    background: var(--bg-card);
}

.sitemap-tab--active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #14b8a6;
}

.sitemap-tab__icon {
    font-size: 1.1rem;
}

/* =====================================================
   CONTENT AREA
   ===================================================== */
.sitemap-generator__content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* =====================================================
   DATE DISPLAY
   ===================================================== */
.sitemap-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(20, 184, 166, 0.1);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
}

.sitemap-date__icon {
    font-size: 1.1rem;
}

.sitemap-date__label {
    color: var(--text-secondary);
}

.sitemap-date__value {
    font-weight: 600;
    color: #14b8a6;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* =====================================================
   MODE CONTAINERS
   ===================================================== */
.sitemap-mode {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sitemap-mode[hidden] {
    display: none !important;
}

/* =====================================================
   FORM STYLES
   ===================================================== */
.sitemap-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.sitemap-form__row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.sitemap-form__row--options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.sitemap-form__field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sitemap-form__field--url {
    flex: 1;
    min-width: 250px;
}

.sitemap-form__field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.sitemap-form__field label .required {
    color: #ef4444;
}

.sitemap-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border-color 0.2s ease;
}

.sitemap-input:focus {
    outline: none;
    border-color: #14b8a6;
}

.sitemap-input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

/* Remove spinners from number inputs */
.sitemap-input[type="number"] {
    -moz-appearance: textfield;
}

.sitemap-input[type="number"]::-webkit-outer-spin-button,
.sitemap-input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.sitemap-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.sitemap-select:focus {
    outline: none;
    border-color: #14b8a6;
}

.sitemap-form__actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

/* =====================================================
   MESSAGE ZONE
   ===================================================== */
.sitemap-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
}

.sitemap-message[hidden] {
    display: none !important;
}

.sitemap-message--success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.sitemap-message--error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.sitemap-message--info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
}

/* =====================================================
   URL LIST
   ===================================================== */
.sitemap-list {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.sitemap-list[hidden] {
    display: none !important;
}

.sitemap-list__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.sitemap-list__header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.sitemap-list__icon {
    font-size: 1.1rem;
}

.sitemap-list__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    background: #14b8a6;
    color: white;
    border-radius: 12px;
}

.sitemap-list__items {
    max-height: 400px;
    overflow-y: auto;
}

/* URL Item */
.sitemap-url-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.sitemap-url-item:last-child {
    border-bottom: none;
}

.sitemap-url-item:hover {
    background: var(--bg-tertiary);
}

.sitemap-url-item__number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
    font-weight: 700;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 50%;
    flex-shrink: 0;
}

.sitemap-url-item__content {
    flex: 1;
    min-width: 0;
}

.sitemap-url-item__url {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-all;
    display: block;
    margin-bottom: 0.25rem;
}

.sitemap-url-item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.sitemap-url-item__tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

.sitemap-url-item__actions {
    display: flex;
    gap: 0.5rem;
}

.sitemap-url-item__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.sitemap-url-item__btn:hover {
    background: var(--bg-tertiary);
    border-color: #14b8a6;
    color: #14b8a6;
}

.sitemap-url-item__btn--delete:hover {
    border-color: #ef4444;
    color: #ef4444;
}

/* =====================================================
   BULK MODE
   ===================================================== */
.sitemap-bulk {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sitemap-bulk__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sitemap-bulk__header label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.sitemap-bulk__hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.sitemap-textarea {
    width: 100%;
    padding: 1rem;
    font-size: 0.875rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    resize: vertical;
    min-height: 200px;
    transition: border-color 0.2s ease;
    line-height: 1.6;
}

.sitemap-textarea:focus {
    outline: none;
    border-color: #14b8a6;
}

.sitemap-textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.sitemap-bulk__options {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    align-items: flex-end;
}

.sitemap-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.sitemap-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: #14b8a6;
}

.sitemap-checkbox label {
    font-size: 0.85rem;
    color: var(--text-primary);
    cursor: pointer;
}

/* =====================================================
   INDEX MODE
   ===================================================== */
.sitemap-index {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sitemap-index__info {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-md);
}

.sitemap-index__icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.sitemap-index__info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

/* =====================================================
   GENERATE SECTION
   ===================================================== */
.sitemap-generate {
    display: flex;
    justify-content: center;
}

.sitemap-generate[hidden] {
    display: none !important;
}

/* =====================================================
   RESULT SECTION
   ===================================================== */
.sitemap-result {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.sitemap-result[hidden] {
    display: none !important;
}

.sitemap-result__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: rgba(34, 197, 94, 0.1);
    border-bottom: 1px solid var(--border-color);
}

.sitemap-result__header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #22c55e;
    margin: 0;
}

.sitemap-result__icon {
    font-size: 1.1rem;
}

.sitemap-result__actions {
    display: flex;
    gap: 0.5rem;
}

.sitemap-result__stats {
    display: flex;
    gap: 2rem;
    padding: 1rem 1.25rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.sitemap-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sitemap-stat__label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sitemap-stat__value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.sitemap-result__code {
    max-height: 400px;
    overflow: auto;
    background: var(--bg-tertiary);
}

.sitemap-result__code pre {
    margin: 0;
    padding: 1rem;
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.6;
}

/* XML Syntax Highlighting */
.sitemap-result__code .xml-tag {
    color: #14b8a6;
}

.sitemap-result__code .xml-attr {
    color: #f59e0b;
}

.sitemap-result__code .xml-value {
    color: #22c55e;
}

.sitemap-result__code .xml-comment {
    color: var(--text-muted);
    font-style: italic;
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn--primary {
    background: #14b8a6;
    color: white;
}

.btn--primary:hover {
    background: #0d9488;
    transform: translateY(-1px);
}

.btn--secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn--secondary:hover {
    background: var(--bg-secondary);
    border-color: #14b8a6;
}

.btn--small {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
}

.btn--large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn--success {
    background: #22c55e !important;
    border-color: #22c55e !important;
    color: white !important;
}

.btn svg {
    flex-shrink: 0;
}

.btn[hidden] {
    display: none !important;
}

/* =====================================================
   PRIVACY NOTICE
   ===================================================== */
.sitemap-privacy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(20, 184, 166, 0.1);
    border-top: 1px solid var(--border-color);
}

.sitemap-privacy span {
    font-size: 1rem;
}

.sitemap-privacy p {
    font-size: 0.85rem;
    color: #14b8a6;
    margin: 0;
}

/* =====================================================
   SEO CONTENT
   ===================================================== */
.tool-content {
    margin-top: 3rem;
}

.tool-section {
    margin-bottom: 2.5rem;
}

.tool-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.tool-section p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
}

.feature-card__icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.feature-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    position: relative;
}

.step-card__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #14b8a6;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 0.75rem;
}

.step-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.step-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.faq-item summary {
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.25rem;
    color: var(--text-muted);
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item p {
    padding: 0 1.5rem 1rem;
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* =====================================================
   HIDDEN ELEMENTS
   ===================================================== */
[hidden] {
    display: none !important;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 640px) {
    .tool-header {
        flex-direction: column;
        text-align: center;
    }
    
    .sitemap-tab__name {
        font-size: 0.8rem;
    }
    
    .sitemap-tab__icon {
        font-size: 1rem;
    }
    
    .sitemap-generator__content {
        padding: 1rem;
    }
    
    .sitemap-form {
        padding: 1rem;
    }
    
    .sitemap-form__row {
        flex-direction: column;
    }
    
    .sitemap-form__row--options {
        grid-template-columns: 1fr;
    }
    
    .sitemap-form__field--url {
        min-width: auto;
    }
    
    .sitemap-form__actions {
        flex-direction: column;
    }
    
    .sitemap-form__actions .btn {
        width: 100%;
    }
    
    .sitemap-bulk__options {
        flex-direction: column;
        gap: 1rem;
    }
    
    .sitemap-result__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .sitemap-result__actions {
        width: 100%;
    }
    
    .sitemap-result__actions .btn {
        flex: 1;
    }
    
    .sitemap-result__stats {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn--large {
        width: 100%;
    }
    
    .format-badges {
        justify-content: center;
    }
    
    .sitemap-url-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .sitemap-url-item__actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* =====================================================
   LIGHT THEME ADJUSTMENTS
   ===================================================== */
[data-theme="light"] .sitemap-input {
    background: white;
}

[data-theme="light"] .sitemap-select {
    background: white;
}

[data-theme="light"] .sitemap-textarea {
    background: white;
}

[data-theme="light"] .sitemap-result__code {
    background: #f8fafc;
}

[data-theme="light"] .sitemap-url-item__number {
    background: #f1f5f9;
}
