/**
 * Custom Sitemap Generator Admin Styles
 * 
 * @version 3.0.0
 */

/* ==========================================================================
   Page Container
   ========================================================================== */

.custom-sitemap-gen-page {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.custom-sitemap-gen-container {
    background: #fff;
    border: 1px solid #c3c4c7;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    margin-top: 20px;
    padding: 20px;
    border-radius: 4px;
}

.custom-sitemap-gen-title {
    padding: 0 0 20px 0;
    margin: 0;
    font-size: 23px;
    font-weight: 400;
    line-height: 29px;
    color: #1d2327;
}

/* ==========================================================================
   Navigation Tabs
   ========================================================================== */

.custom-sitemap-gen-container .nav-tab-wrapper {
    border-bottom: 1px solid #c3c4c7;
    padding-top: 0;
    padding-left: 0;
    background: transparent;
    margin: 0 0 20px 0;
}

.custom-sitemap-gen-container .nav-tab {
    margin-left: 0;
    margin-right: 4px;
    background: #dcdcde;
    border-color: #c3c4c7;
    color: #50575e;
    font-size: 14px;
    padding: 6px 16px;
}

.custom-sitemap-gen-container .nav-tab:hover {
    background: #fff;
    color: #135e96;
}

.custom-sitemap-gen-container .nav-tab-active {
    background: #fff;
    border-bottom: 1px solid #fff;
    color: #1d2327;
}

.custom-sitemap-gen-container .tab-content {
    padding: 20px;
}

/* ==========================================================================
   Sections & Accordions
   ========================================================================== */

.custom-sitemap-gen-section {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
}

.custom-sitemap-gen-section h2 {
    margin-top: 0;
    padding-top: 0;
    font-size: 1.3em;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.accordion-section .accordion-toggle {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.accordion-section.is-open .accordion-toggle {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.accordion-section .accordion-content {
    display: none;
}

.accordion-section.is-open .accordion-content {
    display: block;
}

.custom-sitemap-gen-section h2:first-child {
    margin-top: 0;
}

/* ==========================================================================
   Toggle Switch
   ========================================================================== */

.custom-sitemap-gen-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.custom-sitemap-gen-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.custom-sitemap-gen-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
}

.custom-sitemap-gen-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input:checked + .custom-sitemap-gen-slider {
    background-color: #2271b1;
}

input:focus + .custom-sitemap-gen-slider {
    box-shadow: 0 0 1px #2271b1;
}

input:checked + .custom-sitemap-gen-slider:before {
    transform: translateX(24px);
}

.custom-sitemap-gen-slider.round {
    border-radius: 26px;
}

.custom-sitemap-gen-slider.round:before {
    border-radius: 50%;
}

/* ==========================================================================
   Form Tables
   ========================================================================== */

.custom-sitemap-gen-section .form-table {
    margin-top: 0;
}

.custom-sitemap-gen-section .form-table th {
    padding: 15px 10px 15px 0;
    width: 200px;
}

.custom-sitemap-gen-section .form-table td {
    padding: 10px;
}

.custom-sitemap-gen-section textarea {
    width: 100%;
    max-width: 500px;
}

/* ==========================================================================
   Exclusion Fields
   ========================================================================== */

.exclusion-field {
    background: #f9f9f9;
}

.exclusion-field.hidden {
    display: none;
}

.exclusion-field th {
    padding-left: 20px !important;
    font-weight: normal;
    font-style: italic;
}

/* ==========================================================================
   Sitemap Tables
   ========================================================================== */

.custom-sitemap-gen-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: #fff;
}

.custom-sitemap-gen-table th,
.custom-sitemap-gen-table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
}

.custom-sitemap-gen-table th {
    background: #f9f9f9;
    font-weight: 600;
    color: #1d2327;
}

.custom-sitemap-gen-table tr:last-child td {
    border-bottom: none;
}

.custom-sitemap-gen-table tr:hover {
    background: #f6f7f7;
}

.custom-sitemap-gen-table a {
    color: #2271b1;
    text-decoration: none;
}

.custom-sitemap-gen-table a:hover {
    color: #135e96;
    text-decoration: underline;
}

/* ==========================================================================
   Action Buttons
   ========================================================================== */

.custom-sitemap-gen-actions {
    white-space: nowrap;
}

.custom-sitemap-gen-actions .button {
    margin-right: 5px;
}

.custom-sitemap-gen-actions .button-link-delete {
    color: #b32d2e;
    border-color: #b32d2e;
}

.custom-sitemap-gen-actions .button-link-delete:hover {
    background: #b32d2e;
    color: #fff;
}

/* ==========================================================================
   Quick Actions
   ========================================================================== */

.custom-sitemap-gen-section p .button {
    margin-right: 10px;
}

#ping-status {
    margin-left: 10px;
    font-style: italic;
}

#ping-status.success {
    color: #00a32a;
}

#ping-status.error {
    color: #d63638;
}

/* ==========================================================================
   Progress Bar
   ========================================================================== */

.progress-bar-wrapper {
    height: 20px;
    background: #f0f0f1;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid #c3c4c7;
}

#regeneration-progress-bar {
    height: 100%;
    background: #2271b1;
    transition: width 0.3s ease;
}

#regeneration-status {
    font-size: 13px;
    color: #50575e;
    font-style: italic;
}

/* ==========================================================================
   Search Console Guide
   ========================================================================== */

.search-console-guide {
    max-width: 800px;
}

.guide-step {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
}

.guide-step h3 {
    color: #1d2327;
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    font-size: 1.1em;
}

.guide-step ol,
.guide-step ul {
    margin-left: 20px;
}

.guide-step li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.sitemap-urls {
    background: #f6f7f7;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
}

.sitemap-urls ul {
    list-style: none;
    margin: 10px 0;
    padding: 0;
}

.sitemap-urls li {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    padding: 8px 0;
}

.sitemap-url {
    background: #fff;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
}

.copy-button,
.view-button {
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    text-decoration: none;
    transition: background 0.2s;
}

.copy-button:hover {
    background: #135e96;
}

.view-button {
    background: #50575e;
}

.view-button:hover {
    background: #3c434a;
    color: #fff;
}

.copy-button.copy-success {
    background: #00a32a;
}

.copy-button.copy-error {
    background: #d63638;
}

.resources-list {
    list-style: none;
    padding: 0;
}

.resources-list li {
    margin-bottom: 8px;
}

.resources-list a {
    color: #2271b1;
    text-decoration: none;
    padding: 5px 0;
    display: inline-block;
}

.resources-list a:hover {
    color: #135e96;
    text-decoration: underline;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media screen and (max-width: 782px) {
    .custom-sitemap-gen-page {
        padding: 0 10px;
    }
    
    .custom-sitemap-gen-section .form-table th {
        width: auto;
        display: block;
        padding-bottom: 5px;
    }
    
    .custom-sitemap-gen-section .form-table td {
        display: block;
        padding-left: 0;
    }
    
    .custom-sitemap-gen-table,
    .custom-sitemap-gen-table thead,
    .custom-sitemap-gen-table tbody,
    .custom-sitemap-gen-table th,
    .custom-sitemap-gen-table td,
    .custom-sitemap-gen-table tr {
        display: block;
    }
    
    .custom-sitemap-gen-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .custom-sitemap-gen-table tr {
        border: 1px solid #e5e5e5;
        margin-bottom: 10px;
        border-radius: 4px;
    }
    
    .custom-sitemap-gen-table td {
        border: none;
        border-bottom: 1px solid #f0f0f1;
        position: relative;
        padding-left: 40%;
        min-height: 40px;
    }
    
    .custom-sitemap-gen-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: 35%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: 600;
        color: #50575e;
    }
    
    .custom-sitemap-gen-table td:last-child {
        border-bottom: none;
    }
    
    .sitemap-urls li {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .sitemap-url {
        width: 100%;
        word-break: break-all;
        margin-bottom: 8px;
    }
}

/* ==========================================================================
   More Plugins Grid
   ========================================================================== */

.custom-sitemap-gen-plugins-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}

.custom-sitemap-gen-plugins-grid .plugin-card {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    width: 280px;
    transition: all 0.2s ease-in-out;
    overflow: hidden;
    box-sizing: border-box;
}

.custom-sitemap-gen-plugins-grid .plugin-card:hover {
    border-color: #2271b1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.custom-sitemap-gen-plugins-grid .plugin-card-content {
    padding: 20px;
    text-align: center;
}

.custom-sitemap-gen-plugins-grid .plugin-logo {
    margin: 0 auto 15px;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
}

.custom-sitemap-gen-plugins-grid .plugin-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.custom-sitemap-gen-plugins-grid .plugin-info h3 {
    margin: 0 0 8px 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.custom-sitemap-gen-plugins-grid .plugin-info h3 a {
    text-decoration: none;
    color: #1d2327;
}

.custom-sitemap-gen-plugins-grid .plugin-info h3 a:hover {
    color: #2271b1;
}

.custom-sitemap-gen-plugins-grid h3 .dashicons-external {
    font-size: 12px;
    width: 12px;
    height: 12px;
    opacity: 0.5;
    vertical-align: middle;
}

.custom-sitemap-gen-plugins-grid .plugin-description {
    margin: 0;
    color: #646970;
    line-height: 1.5;
    font-size: 13px;
}

.custom-sitemap-gen-plugins-grid .plugin-card-footer {
    padding: 15px 20px;
    background: #f6f7f7;
    border-top: 1px solid #dcdcde;
}

.custom-sitemap-gen-plugins-grid .plugin-card-footer .button {
    width: 100%;
    text-align: center;
}

@media screen and (max-width: 782px) {
    .custom-sitemap-gen-plugins-grid {
        justify-content: center;
    }
    .custom-sitemap-gen-plugins-grid .plugin-card {
        width: 100%;
        max-width: 300px;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .custom-sitemap-gen-container .nav-tab-wrapper,
    .custom-sitemap-gen-actions,
    .copy-button,
    .view-button,
    #ping-search-engines {
        display: none !important;
    }
    
    .custom-sitemap-gen-table {
        border: 1px solid #000;
    }
    
    .custom-sitemap-gen-table th,
    .custom-sitemap-gen-table td {
        border: 1px solid #000;
    }
}
