/**
 * Prime SEO - XML Sitemap Admin Page Styles
 *
 * @package    Prime_SEO
 * @subpackage Prime_SEO/admin/css
 * @since      1.5.0
 */

/* ==========================================================================
   Base
   ========================================================================== */

.prime-sitemap-wrap * {
    box-sizing: border-box;
}

.prime-sitemap-wrap {
    margin: -8px -20px 0 -2px;
    background: #f1f5f9;
    min-height: 100vh;
}

/* ==========================================================================
   Header - Dark Premium Style
   ========================================================================== */

.prime-sitemap-header {
    background: linear-gradient(160deg, rgb(17, 24, 39) 0%, rgb(31, 41, 55) 50%, rgb(17, 24, 39) 100%);
    padding: 32px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.prime-sitemap-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.prime-sitemap-logo {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.prime-sitemap-logo .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: #fff;
}

.prime-sitemap-header h1 {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.prime-sitemap-header-sub {
    font-size: 13px;
    color: #818cf8;
    margin: 6px 0 0;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.prime-sitemap-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.prime-sitemap-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 8px;
    color: #818cf8;
    font-size: 13px;
    text-decoration: none;
    font-weight: 500;
}

.prime-sitemap-back:hover {
    background: rgba(99, 102, 241, 0.25);
    color: #a5b4fc;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.prime-sitemap-layout {
    display: flex;
    gap: 24px;
    padding: 24px 32px;
    max-width: 1400px;
}

.prime-sitemap-main {
    flex: 1;
    min-width: 0;
    max-width: 900px;
}

.prime-sitemap-sidebar {
    width: 300px;
    flex-shrink: 0;
}

@media (max-width: 1100px) {
    .prime-sitemap-layout {
        flex-direction: column;
    }

    .prime-sitemap-sidebar {
        width: 100%;
    }
}

/* ==========================================================================
   Stats
   ========================================================================== */

.prime-sitemap-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 24px;
}

.prime-sitemap-stat {
    flex: 1;
    min-width: 200px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.prime-sitemap-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prime-sitemap-stat-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #fff;
}

.prime-sitemap-stat-icon.green {
    background: linear-gradient(135deg, #34d399, #10b981);
}

.prime-sitemap-stat-icon.blue {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
}

.prime-sitemap-stat-icon.purple {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
}

.prime-sitemap-stat h3 {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.prime-sitemap-stat span {
    font-size: 13px;
    color: #64748b;
    display: block;
}

/* ==========================================================================
   Card
   ========================================================================== */

.prime-sitemap-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
    overflow: hidden;
}

.prime-sitemap-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 16px;
}

.prime-sitemap-card-icon {
    width: 44px;
    height: 44px;
    background: #eef2ff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prime-sitemap-card-icon .dashicons {
    font-size: 22px;
    width: 22px;
    height: 22px;
    color: #6366f1;
}

.prime-sitemap-card-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px;
}

.prime-sitemap-card-header p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.prime-sitemap-card-body {
    padding: 24px;
}

.prime-sitemap-card-footer {
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

/* ==========================================================================
   Toggle
   ========================================================================== */

.prime-sitemap-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 16px;
}

.prime-sitemap-toggle:last-child {
    margin-bottom: 0;
}

.prime-sitemap-toggle-text h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px;
}

.prime-sitemap-toggle-text p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.prime-sitemap-switch {
    position: relative;
    width: 52px;
    height: 28px;
}

.prime-sitemap-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.prime-sitemap-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #cbd5e1;
    border-radius: 28px;
    transition: 0.3s;
}

.prime-sitemap-switch-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.prime-sitemap-switch input:checked + .prime-sitemap-switch-slider {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.prime-sitemap-switch input:checked + .prime-sitemap-switch-slider:before {
    transform: translateX(24px);
}

/* ==========================================================================
   URL Box
   ========================================================================== */

.prime-sitemap-url-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #d1fae5;
    border-radius: 8px;
    margin-bottom: 20px;
}

.prime-sitemap-url-box-icon {
    width: 40px;
    height: 40px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.prime-sitemap-url-box-icon .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #fff;
}

.prime-sitemap-url-box-content {
    flex: 1;
}

.prime-sitemap-url-box h4 {
    font-size: 14px;
    font-weight: 600;
    color: #065f46;
    margin: 0 0 2px;
}

.prime-sitemap-url-box p {
    font-size: 13px;
    color: #047857;
    margin: 0;
}

.prime-sitemap-url-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.prime-sitemap-url-row code {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    font-size: 13px;
    color: #1e293b;
    word-break: break-all;
}

.prime-sitemap-url-row a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 18px;
    background: #fff;
    border: 2px solid #10b981;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #10b981;
    text-decoration: none;
}

.prime-sitemap-url-row a:hover {
    background: #10b981;
    color: #fff;
}

/* ==========================================================================
   Grid Checkboxes
   ========================================================================== */

.prime-sitemap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.prime-sitemap-grid-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    border: 2px solid transparent;
}

.prime-sitemap-grid-item:hover {
    background: #f1f5f9;
}

.prime-sitemap-grid-item.checked {
    background: #eef2ff;
    border-color: #6366f1;
}

.prime-sitemap-grid-item input {
    width: 18px;
    height: 18px;
    accent-color: #6366f1;
}

.prime-sitemap-grid-item-text {
    font-size: 14px;
    color: #1e293b;
    flex: 1;
}

.prime-sitemap-grid-item-slug {
    font-size: 12px;
    color: #94a3b8;
}

/* ==========================================================================
   Section
   ========================================================================== */

.prime-sitemap-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.prime-sitemap-section h4 {
    margin: 0 0 16px;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.prime-sitemap-section h4 .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #6366f1;
}

/* ==========================================================================
   Save Button
   ========================================================================== */

.prime-sitemap-save {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.prime-sitemap-save:hover {
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
}

.prime-sitemap-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.prime-sitemap-save .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.prime-sitemap-save.saving .dashicons {
    animation: prime-sitemap-spin 1s linear infinite;
}

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

/* ==========================================================================
   Regenerate Button
   ========================================================================== */

.prime-sitemap-regenerate {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s;
}

.prime-sitemap-regenerate:hover {
    border-color: #6366f1;
    color: #6366f1;
}

/* ==========================================================================
   Disabled State
   ========================================================================== */

.prime-sitemap-disabled {
    background: #fef2f2;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.prime-sitemap-disabled-icon {
    width: 40px;
    height: 40px;
    background: #fecaca;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prime-sitemap-disabled-icon .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #dc2626;
}

.prime-sitemap-disabled h4 {
    font-size: 14px;
    font-weight: 600;
    color: #991b1b;
    margin: 0 0 2px;
}

.prime-sitemap-disabled p {
    font-size: 13px;
    color: #b91c1c;
    margin: 0;
}

/* ==========================================================================
   Module Toggle (Top Card like Redirects)
   ========================================================================== */

.prime-sitemap-module-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.prime-sitemap-module-toggle-text h4 {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px;
}

.prime-sitemap-module-toggle-text p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.prime-sitemap-module-disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ==========================================================================
   Toast
   ========================================================================== */

.prime-sitemap-toast {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: #1e293b;
    color: #fff;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    transform: translateX(calc(100% + 50px));
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.prime-sitemap-toast.visible {
    transform: translateX(0);
}

.prime-sitemap-toast.success {
    background: #6366f1;
}

.prime-sitemap-toast.error {
    background: #ef4444;
}

.prime-sitemap-toast .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   Spin Animation (for regenerate button)
   ========================================================================== */

.prime-spin {
    animation: prime-sitemap-spin 1s linear infinite;
}

/* ==========================================================================
   Video Sitemap (PRO)
   ========================================================================== */

.prime-sitemap-video-card {
    border: 1px solid #c7d2fe;
}

.prime-sitemap-card-icon-video {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.prime-sitemap-card-icon-video .dashicons {
    color: #fff !important;
}

.prime-sitemap-pro-badge {
    display: inline-block;
    padding: 3px 10px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 20px;
    margin-left: 8px;
    vertical-align: middle;
}

.prime-sitemap-url-box-video {
    background: #eef2ff;
}

.prime-sitemap-url-box-icon-video {
    background: #6366f1 !important;
}

.prime-sitemap-url-row-video code {
    border-color: #c7d2fe;
}

.prime-sitemap-url-row-video a {
    border-color: #6366f1;
    color: #6366f1;
}

.prime-sitemap-url-row-video a:hover {
    background: #6366f1;
    color: #fff;
}

.prime-sitemap-info-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    background: #f0f9ff;
    border-left: 4px solid #0ea5e9;
    border-radius: 0 8px 8px 0;
    margin-top: 20px;
}

.prime-sitemap-info-box .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #0284c7;
    flex-shrink: 0;
    margin-top: 2px;
}

.prime-sitemap-info-box strong {
    display: block;
    font-size: 13px;
    color: #0369a1;
    margin-bottom: 4px;
}

.prime-sitemap-info-box span {
    font-size: 13px;
    color: #0284c7;
}

/* ==========================================================================
   How It Works Section (Video Sitemap)
   ========================================================================== */

.prime-sitemap-how-it-works {
    margin-top: 24px;
    padding: 20px;
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border: 1px solid #e9d5ff;
    border-radius: 12px;
}

.prime-sitemap-how-it-works h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #6b21a8;
    margin: 0 0 16px;
}

.prime-sitemap-how-it-works h4 .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #9333ea;
}

.prime-sitemap-how-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 900px) {
    .prime-sitemap-how-grid {
        grid-template-columns: 1fr;
    }
}

.prime-sitemap-how-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.prime-sitemap-how-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.prime-sitemap-how-icon .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #fff;
}

.prime-sitemap-how-text strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.prime-sitemap-how-text p {
    font-size: 12px;
    line-height: 1.5;
    color: #64748b;
    margin: 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 782px) {
    .prime-sitemap-content {
        padding: 16px;
    }

    .prime-sitemap-header {
        padding: 16px;
    }

    .prime-sitemap-stats {
        flex-direction: column;
    }

    .prime-sitemap-stat {
        min-width: 100%;
    }
}
