/**
 * Visual Sitemap Public Styles
 * 
 * @package    Rocketship_Seo
 * @subpackage Rocketship_Seo/public/css
 * @since      1.0.0
 */

/* ==========================================================================
   GENERAL SITEMAP STYLES
   ========================================================================== */

.rocketship-visual-sitemap-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
    margin: 0;
    padding: 0;
}

.rocketship-sitemap-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ==========================================================================
   HEADER SECTION
   ========================================================================== */

.rocketship-sitemap-header {
    text-align: center;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 40px 20px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.rocketship-sitemap-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #212529;
    margin: 0 0 15px 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.rocketship-sitemap-header p {
    font-size: 1.1rem;
    color: #6c757d;
    margin: 0 0 25px 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.rocketship-sitemap-stats {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: rgba(0, 123, 186, 0.1);
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    color: #007cba;
    font-weight: 500;
}

/* ==========================================================================
   CONTROLS SECTION
   ========================================================================== */

.rocketship-sitemap-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
}

.rocketship-sitemap-search {
    flex: 1;
    min-width: 300px;
    display: flex;
    gap: 10px;
}

.rocketship-sitemap-search input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.rocketship-sitemap-search input:focus {
    outline: none;
    border-color: #007cba;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 123, 186, 0.1);
}

.rocketship-sitemap-search button {
    padding: 12px 16px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    min-width: 50px;
}

.rocketship-sitemap-search button:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.rocketship-sitemap-filters {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.rocketship-sitemap-filters select {
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 160px;
}

.rocketship-sitemap-filters select:focus {
    outline: none;
    border-color: #007cba;
    background: white;
}

/* ==========================================================================
   LOADING STATE
   ========================================================================== */

.rocketship-sitemap-loading {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.rocketship-sitemap-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   CONTENT SECTIONS
   ========================================================================== */

.rocketship-sitemap-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
    overflow: hidden;
}

/* Tree View */
.rocketship-sitemap-tree {
    padding: 30px;
}

.rocketship-sitemap-section {
    margin-bottom: 40px;
}

.rocketship-sitemap-section:last-child {
    margin-bottom: 0;
}

.rocketship-sitemap-section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rocketship-sitemap-section-icon {
    width: 24px;
    height: 24px;
    background: #007cba;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
}

.rocketship-sitemap-tree-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rocketship-sitemap-tree-item {
    margin-bottom: 8px;
    position: relative;
}

.rocketship-sitemap-tree-item.level-0 {
    margin-left: 0;
}

.rocketship-sitemap-tree-item.level-1 {
    margin-left: 25px;
}

.rocketship-sitemap-tree-item.level-2 {
    margin-left: 50px;
}

.rocketship-sitemap-tree-item.level-3 {
    margin-left: 75px;
}

.rocketship-sitemap-tree-item.level-4 {
    margin-left: 100px;
}

.rocketship-sitemap-tree-item:before {
    content: '';
    position: absolute;
    left: -15px;
    top: 50%;
    width: 8px;
    height: 8px;
    background: #007cba;
    border-radius: 50%;
    transform: translateY(-50%);
    opacity: 0.6;
}

.rocketship-sitemap-tree-item.level-0:before {
    display: none;
}

.rocketship-sitemap-tree-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    text-decoration: none;
    color: #495057;
    font-weight: 500;
    transition: all 0.3s ease;
    max-width: 100%;
    word-break: break-word;
}

.rocketship-sitemap-tree-link:hover {
    background: #007cba;
    color: white;
    border-color: #007cba;
    transform: translateX(5px);
    text-decoration: none;
}

.rocketship-sitemap-tree-link.homepage {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    border-color: #007cba;
    font-weight: 600;
}

.rocketship-sitemap-tree-link.category {
    background: linear-gradient(135deg, #28a745 0%, #20693e 100%);
    color: white;
    border-color: #28a745;
}

.rocketship-sitemap-tree-link.post-type-archive {
    background: linear-gradient(135deg, #6f42c1 0%, #563d7c 100%);
    color: white;
    border-color: #6f42c1;
}

/* Grid View */
.rocketship-sitemap-grid {
    padding: 30px;
}

.rocketship-sitemap-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.rocketship-sitemap-grid-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.rocketship-sitemap-grid-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border-color: #007cba;
}

.rocketship-sitemap-grid-item h3 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
}

.rocketship-sitemap-grid-item a {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
    display: block;
    padding: 5px 0;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.rocketship-sitemap-grid-item a:hover {
    color: #005a87;
    padding-left: 8px;
    border-color: #007cba;
}

.rocketship-sitemap-grid-item a:last-child {
    border-bottom: none;
}

/* List View */
.rocketship-sitemap-list {
    padding: 0;
}

.rocketship-sitemap-list-section {
    border-bottom: 1px solid #e9ecef;
}

.rocketship-sitemap-list-section:last-child {
    border-bottom: none;
}

.rocketship-sitemap-list-header {
    background: #f8f9fa;
    padding: 20px 30px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #212529;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rocketship-sitemap-list-content {
    padding: 20px 30px;
}

.rocketship-sitemap-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f8f9fa;
    transition: all 0.3s ease;
}

.rocketship-sitemap-list-item:hover {
    background: #f8f9fa;
    margin: 0 -15px;
    padding: 12px 15px;
    border-radius: 6px;
}

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

.rocketship-sitemap-list-link {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.rocketship-sitemap-list-link:hover {
    color: #005a87;
    text-decoration: underline;
}

.rocketship-sitemap-list-meta {
    font-size: 0.85rem;
    color: #6c757d;
    display: flex;
    gap: 15px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.rocketship-sitemap-footer {
    text-align: center;
    margin-top: 40px;
    padding: 30px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
}

.rocketship-sitemap-footer p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.rocketship-sitemap-footer a {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.rocketship-sitemap-footer a:hover {
    color: #005a87;
    text-decoration: underline;
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

.rocketship-sitemap-hidden {
    display: none !important;
}

.rocketship-sitemap-highlight {
    background: #fff3cd !important;
    border-color: #ffeaa7 !important;
}

.rocketship-sitemap-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-style: italic;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 768px) {
    .rocketship-sitemap-container {
        padding: 15px;
    }
    
    .rocketship-sitemap-header {
        padding: 30px 15px;
        margin-bottom: 30px;
    }
    
    .rocketship-sitemap-header h1 {
        font-size: 2rem;
    }
    
    .rocketship-sitemap-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .rocketship-sitemap-search {
        min-width: auto;
    }
    
    .rocketship-sitemap-filters {
        flex-direction: column;
    }
    
    .rocketship-sitemap-filters select {
        min-width: auto;
    }
    
    .rocketship-sitemap-grid-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .rocketship-sitemap-tree,
    .rocketship-sitemap-grid,
    .rocketship-sitemap-list-content {
        padding: 20px;
    }
    
    .rocketship-sitemap-list-header {
        padding: 15px 20px;
    }
    
    .rocketship-sitemap-tree-item.level-1,
    .rocketship-sitemap-tree-item.level-2,
    .rocketship-sitemap-tree-item.level-3,
    .rocketship-sitemap-tree-item.level-4 {
        margin-left: 20px;
    }
    
    .rocketship-sitemap-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .rocketship-sitemap-list-meta {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .rocketship-sitemap-header h1 {
        font-size: 1.5rem;
    }
    
    .rocketship-sitemap-stats {
        flex-direction: column;
        gap: 8px;
    }
    
    .rocketship-sitemap-tree-item.level-1,
    .rocketship-sitemap-tree-item.level-2,
    .rocketship-sitemap-tree-item.level-3,
    .rocketship-sitemap-tree-item.level-4 {
        margin-left: 15px;
    }
}

/* ==========================================================================
   ACCESSIBILITY IMPROVEMENTS
   ========================================================================== */

.rocketship-sitemap-tree-link:focus,
.rocketship-sitemap-list-link:focus,
.rocketship-sitemap-grid-item a:focus,
.rocketship-sitemap-search input:focus,
.rocketship-sitemap-filters select:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* ==========================================================================
   ANIMATION ENHANCEMENTS
   ========================================================================== */

.rocketship-sitemap-content {
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rocketship-sitemap-tree-item {
    animation: slideInLeft 0.4s ease;
    animation-fill-mode: both;
}

.rocketship-sitemap-tree-item:nth-child(1) { animation-delay: 0.1s; }
.rocketship-sitemap-tree-item:nth-child(2) { animation-delay: 0.2s; }
.rocketship-sitemap-tree-item:nth-child(3) { animation-delay: 0.3s; }
.rocketship-sitemap-tree-item:nth-child(4) { animation-delay: 0.4s; }
.rocketship-sitemap-tree-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.rocketship-sitemap-grid-item {
    animation: fadeInScale 0.5s ease;
    animation-fill-mode: both;
}

.rocketship-sitemap-grid-item:nth-child(1) { animation-delay: 0.1s; }
.rocketship-sitemap-grid-item:nth-child(2) { animation-delay: 0.2s; }
.rocketship-sitemap-grid-item:nth-child(3) { animation-delay: 0.3s; }
.rocketship-sitemap-grid-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
