/**
 * Custom Sitemap Generator - Sitemap Display Styles
 * 
 * Styles for the XML sitemap display page
 * @version 3.0.0
 */

/* ==========================================================================
   Base Styles
   ========================================================================== */

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #1d2327;
    background: #f0f0f1;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* ==========================================================================
   Container
   ========================================================================== */

.sitemap-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* ==========================================================================
   Header
   ========================================================================== */

.sitemap-header {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #2271b1;
}

.sitemap-header h1 {
    color: #1d2327;
    font-size: 2em;
    margin: 0 0 10px;
    font-weight: 600;
}

.sitemap-description {
    color: #50575e;
    font-size: 1em;
    margin: 0;
}

.sitemap-description strong {
    color: #2271b1;
}

/* ==========================================================================
   Table Styles
   ========================================================================== */

.sitemap-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.sitemap-table th {
    background: #2271b1;
    color: #fff;
    font-weight: 600;
    padding: 15px 20px;
    text-align: left;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sitemap-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #e5e5e5;
    vertical-align: middle;
}

.sitemap-table tr:last-child td {
    border-bottom: none;
}

.sitemap-table tr:hover {
    background: #f6f7f7;
}

/* Column widths */
.col-url,
.col-sitemap {
    width: 50%;
}

.col-lastmod {
    width: 20%;
}

.col-changefreq {
    width: 15%;
}

.col-priority {
    width: 15%;
    text-align: center;
}

/* ==========================================================================
   URL Links
   ========================================================================== */

.url {
    color: #2271b1;
    text-decoration: none;
    word-break: break-all;
    transition: color 0.2s;
}

.url:hover {
    color: #135e96;
    text-decoration: underline;
}

/* ==========================================================================
   Change Frequency Badges
   ========================================================================== */

.changefreq {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
    text-transform: capitalize;
}

.changefreq-always {
    background: #d63638;
    color: #fff;
}

.changefreq-hourly {
    background: #dba617;
    color: #fff;
}

.changefreq-daily {
    background: #00a32a;
    color: #fff;
}

.changefreq-weekly {
    background: #2271b1;
    color: #fff;
}

.changefreq-monthly {
    background: #8c8f94;
    color: #fff;
}

.changefreq-yearly {
    background: #50575e;
    color: #fff;
}

.changefreq-never {
    background: #c3c4c7;
    color: #50575e;
}

/* ==========================================================================
   Not Available
   ========================================================================== */

.not-available {
    color: #8c8f94;
    font-style: italic;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.sitemap-footer {
    text-align: center;
    padding: 20px;
    color: #50575e;
    font-size: 0.9em;
}

.sitemap-footer a {
    color: #2271b1;
    text-decoration: none;
}

.sitemap-footer a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media (max-width: 768px) {
    .sitemap-container {
        padding: 15px 10px;
    }
    
    .sitemap-header {
        padding: 20px;
    }
    
    .sitemap-header h1 {
        font-size: 1.5em;
    }
    
    .sitemap-table,
    .sitemap-table thead,
    .sitemap-table tbody,
    .sitemap-table th,
    .sitemap-table td,
    .sitemap-table tr {
        display: block;
    }
    
    .sitemap-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .sitemap-table tr {
        margin-bottom: 15px;
        border-radius: 8px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
    
    .sitemap-table td {
        border: none;
        border-bottom: 1px solid #f0f0f1;
        position: relative;
        padding: 12px 15px 12px 45%;
        min-height: 45px;
        display: flex;
        align-items: center;
    }
    
    .sitemap-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        width: 40%;
        padding-right: 10px;
        font-weight: 600;
        color: #50575e;
        font-size: 0.85em;
        text-transform: uppercase;
    }
    
    .sitemap-table td:last-child {
        border-bottom: none;
        border-radius: 0 0 8px 8px;
    }
    
    .sitemap-table td:first-child {
        border-radius: 8px 8px 0 0;
        background: #f6f7f7;
    }
    
    .col-url,
    .col-sitemap,
    .col-lastmod,
    .col-changefreq,
    .col-priority {
        width: 100%;
        text-align: left;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    body {
        background: #fff;
    }
    
    .sitemap-container {
        max-width: 100%;
        padding: 0;
    }
    
    .sitemap-header {
        box-shadow: none;
        border: 1px solid #000;
        border-radius: 0;
    }
    
    .sitemap-table {
        box-shadow: none;
        border: 1px solid #000;
        border-radius: 0;
    }
    
    .sitemap-table th {
        background: #f0f0f1;
        color: #000;
        border-bottom: 2px solid #000;
    }
    
    .sitemap-table td {
        border-bottom: 1px solid #000;
    }
    
    .url {
        color: #000;
    }
    
    .changefreq {
        background: none !important;
        color: #000 !important;
        border: 1px solid #000;
    }
    
    .sitemap-footer {
        margin-top: 20px;
        border-top: 1px solid #000;
        padding-top: 10px;
    }
}

/* ==========================================================================
   Dark Mode Support (prefers-color-scheme)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    body {
        background: #1d2327;
        color: #f0f0f1;
    }
    
    .sitemap-header {
        background: #2c3338;
        border-left-color: #72aee6;
    }
    
    .sitemap-header h1 {
        color: #f0f0f1;
    }
    
    .sitemap-description {
        color: #c3c4c7;
    }
    
    .sitemap-description strong {
        color: #72aee6;
    }
    
    .sitemap-table {
        background: #2c3338;
    }
    
    .sitemap-table th {
        background: #135e96;
    }
    
    .sitemap-table td {
        border-bottom-color: #3c434a;
    }
    
    .sitemap-table tr:hover {
        background: #3c434a;
    }
    
    .url {
        color: #72aee6;
    }
    
    .url:hover {
        color: #9ec2e6;
    }
    
    .not-available {
        color: #8c8f94;
    }
    
    .sitemap-footer {
        color: #8c8f94;
    }
    
    .sitemap-footer a {
        color: #72aee6;
    }
}
