/* ============================================================
   SEO Redirection v9.17 — Main Stylesheet
   Scoped to plugin page via .settings_page_seo-redirection
   ============================================================ */

/* ── CSS Variables (Light / Dark) ─────────────────────────── */
:root {
    --wpsr-bg:          #ffffff;
    --wpsr-bg2:         #f8fafc;
    --wpsr-bg3:         #eef2f7;
    --wpsr-border:      #d1d9e6;
    --wpsr-border2:     #b0bccc;
    --wpsr-text:        #111827;
    --wpsr-text2:       #4b5563;
    --wpsr-text3:       #9ca3af;
    --wpsr-blue-bg:     #dbeafe;
    --wpsr-blue-text:   #1e40af;
    --wpsr-blue-border: #93c5fd;
    --wpsr-green-bg:    #dcfce7;
    --wpsr-green-text:  #15803d;
    --wpsr-green-border:#86efac;
    --wpsr-amber-bg:    #fef9c3;
    --wpsr-amber-text:  #92400e;
    --wpsr-amber-border:#fde68a;
    --wpsr-red:         #dc2626;
    --wpsr-accent:      #2563eb;
    --wpsr-radius:      8px;
}

/* ── Page wrapper ──────────────────────────────────────────── */

.settings_page_seo-redirection .wrap {
    background: var(--wpsr-bg);
    border: 1.5px solid var(--wpsr-border);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 12px;
    padding: 0 !important;
    transition: background .2s, border-color .2s;
}
.settings_page_seo-redirection .wrap h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--wpsr-text);
    padding: 14px 18px 0;
    margin: 0;
}

/* ── Tabs ──────────────────────────────────────────────────── */
.settings_page_seo-redirection ul.tabs {
    display: flex;
    list-style: none;
    margin: 10px 0 0;
    padding: 0 18px;
    border-bottom: 1.5px solid var(--wpsr-border);
    background: var(--wpsr-bg);
    min-width: 0;
    float: none;
    height: auto;
    flex-wrap: wrap;
    gap: 0;
}
.settings_page_seo-redirection ul.tabs li {
    float: none;
    height: auto;
    line-height: normal;
    border: none;
    background: none;
    border-radius: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
    position: static;
}
.settings_page_seo-redirection ul.tabs li a {
    display: block;
    padding: 9px 14px;
    font-size: 12.5px;
    color: var(--wpsr-text2);
    text-decoration: none;
    border: none;
    border-bottom: 2.5px solid transparent;
    border-radius: 0;
    background: none;
    outline: none;
    white-space: nowrap;
    transition: color .15s, border-color .15s;
}
.settings_page_seo-redirection ul.tabs li a:hover {
    color: var(--wpsr-text);
    background: none;
}
.settings_page_seo-redirection ul.tabs li.active a,
.settings_page_seo-redirection html ul.tabs li.active a:hover {
    color: var(--wpsr-accent);
    border-bottom-color: var(--wpsr-accent);
    font-weight: 600;
    background: none;
}

/* ── Tab container ─────────────────────────────────────────── */
.settings_page_seo-redirection .tabContainer {
    border: none;
    border-radius: 0;
    background: var(--wpsr-bg);
    float: none;
    clear: both;
    width: 100%;
    min-width: 0;
    box-shadow: none;
    transition: background .2s;
}
.settings_page_seo-redirection .tabContent {
    padding: 18px;
}

/* ── Toolbar: Add New + Search ─────────────────────────────── */
.settings_page_seo-redirection .link_buttons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.settings_page_seo-redirection .link_buttons a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--wpsr-bg2) !important;
    color: var(--wpsr-text) !important;
    border: 1.5px solid var(--wpsr-border2) !important;
    border-radius: var(--wpsr-radius);
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    margin: 0 !important;
    transition: background .15s;
}
.settings_page_seo-redirection .link_buttons a:hover {
    background: var(--wpsr-bg3) !important;
    color: var(--wpsr-text) !important;
}

/* ── Buttons ───────────────────────────────────────────────── */
.settings_page_seo-redirection .btn-custom {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: var(--wpsr-radius);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    border: 1.5px solid transparent;
    padding: 6px 14px;
    text-decoration: none;
    transition: all .15s;
    line-height: 1.4;
    height: auto;
}
.settings_page_seo-redirection .btn-add {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #1d4ed8 !important;
}
.settings_page_seo-redirection .btn-add:hover {
    background: #1d4ed8 !important;
    color: #ffffff !important;
}
[data-wpsr-theme="dark"] .settings_page_seo-redirection .btn-add {
    background: #1d4ed8 !important;
    border-color: #1e40af !important;
}
.settings_page_seo-redirection .btn-search {
    background: var(--wpsr-bg2) !important;
    color: var(--wpsr-text) !important;
    border-color: var(--wpsr-border2) !important;
}
.settings_page_seo-redirection .btn-search:hover {
    background: var(--wpsr-bg3) !important;
}
.settings_page_seo-redirection .btn-delete {
    background: var(--wpsr-bg2) !important;
    color: var(--wpsr-red) !important;
    border-color: var(--wpsr-border2) !important;
}
.settings_page_seo-redirection .btn-delete:hover {
    background: var(--wpsr-bg3) !important;
}

/* ── Search input ──────────────────────────────────────────── */
.settings_page_seo-redirection #search,
.settings_page_seo-redirection input[type="text"].btn-right {
    border: 1.5px solid var(--wpsr-border2) !important;
    border-radius: var(--wpsr-radius) !important;
    padding: 6px 11px !important;
    font-size: 12px;
    background: var(--wpsr-bg2) !important;
    color: var(--wpsr-text) !important;
    height: auto !important;
    outline: none;
    transition: border-color .15s, background .2s;
}
.settings_page_seo-redirection #search:focus {
    border-color: var(--wpsr-accent) !important;
}

/* ── Data table ────────────────────────────────────────────── */
.settings_page_seo-redirection .grid,
.settings_page_seo-redirection .wp-list-table {
    border: none !important;
    border-collapse: collapse;
    width: 100%;
    font-size: 12.5px;
}
.settings_page_seo-redirection .grid thead td,
.settings_page_seo-redirection .wp-list-table thead th,
.settings_page_seo-redirection .wp-list-table thead td {
    background: var(--wpsr-bg2) !important;
    color: var(--wpsr-text3) !important;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    padding: 8px 10px;
    border-bottom: 1.5px solid var(--wpsr-border) !important;
    border-right: none !important;
    border-top: none !important;
    border-left: none !important;
}
.settings_page_seo-redirection .grid td,
.settings_page_seo-redirection .wp-list-table td {
    padding: 10px !important;
    border: none !important;
    border-bottom: 1px solid var(--wpsr-border) !important;
    color: var(--wpsr-text);
    font-size: 12.5px;
    transition: background .15s;
}
.settings_page_seo-redirection .grid tbody tr:nth-child(even),
.settings_page_seo-redirection .grid tbody tr:nth-child(odd),
.settings_page_seo-redirection .wp-list-table.striped tr:nth-child(odd),
.settings_page_seo-redirection .wp-list-table.striped tr:nth-child(even) {
    background: var(--wpsr-bg) !important;
}
.settings_page_seo-redirection .grid tbody tr:hover,
.settings_page_seo-redirection .wp-list-table tbody tr:hover {
    background: var(--wpsr-bg2) !important;
}

/* ── Pagination ────────────────────────────────────────────── */
.settings_page_seo-redirection .pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 4px;
    margin: 14px 0 4px;
    padding-top: 12px;
    border-top: 1px solid var(--wpsr-border);
}
.settings_page_seo-redirection .pagination a,
.settings_page_seo-redirection .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border: 1.5px solid var(--wpsr-border2) !important;
    border-radius: var(--wpsr-radius);
    background: var(--wpsr-bg2) !important;
    color: var(--wpsr-text) !important;
    font-size: 12px;
    text-decoration: none;
    margin: 0 !important;
    transition: background .15s;
}
.settings_page_seo-redirection .pagination a:hover {
    background: var(--wpsr-bg3) !important;
    color: var(--wpsr-text) !important;
}
.settings_page_seo-redirection .pagination span.currentpage {
    background: var(--wpsr-blue-bg) !important;
    color: var(--wpsr-blue-text) !important;
    border-color: var(--wpsr-blue-border) !important;
    font-weight: 600;
    text-decoration: none;
}
.settings_page_seo-redirection .pagination input {
    width: 36px !important;
    height: 28px !important;
    border: 1.5px solid var(--wpsr-border2) !important;
    border-radius: var(--wpsr-radius) !important;
    text-align: center;
    font-size: 12px;
    background: var(--wpsr-bg2) !important;
    color: var(--wpsr-text) !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ── cform ─────────────────────────────────────────────────── */
.settings_page_seo-redirection .cform td {
    padding: 6px 8px;
    font-size: 13px;
    border: none;
    background: transparent;
}
.settings_page_seo-redirection .cform tbody td.label {
    width: 120px;
    vertical-align: top;
    padding-top: 10px;
    font-weight: 500;
    color: var(--wpsr-text2);
}
.settings_page_seo-redirection .cform tbody tr:nth-child(odd),
.settings_page_seo-redirection .cform tbody tr:nth-child(even) {
    background: transparent !important;
}

/* ── Loading spinner ───────────────────────────────────────── */
.settings_page_seo-redirection .loading {
    position: fixed;
    z-index: 99999999;
    height: 2em;
    width: 2em;
    margin: auto;
    top: 0; left: 0; bottom: 0; right: 0;
}
.settings_page_seo-redirection .loading:before {
    content: '';
    display: block;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,.7);
}
.settings_page_seo-redirection .loading:not(:required) {
    font: 0/0 a;
    color: transparent;
    text-shadow: none;
    background-color: transparent;
    border: 0;
}
.settings_page_seo-redirection .loading:not(:required):after {
    content: '';
    display: block;
    font-size: 10px;
    width: 1em; height: 1em;
    margin-top: -.5em;
    animation: wpsr-spinner 900ms infinite linear;
    border-radius: .5em;
    box-shadow:
        rgba(255,255,255,.85) 1.5em 0 0 0,
        rgba(255,255,255,.85) 1.1em 1.1em 0 0,
        rgba(255,255,255,.85) 0 1.5em 0 0,
        rgba(255,255,255,.85) -1.1em 1.1em 0 0,
        rgba(255,255,255,.85) -1.5em 0 0 0,
        rgba(255,255,255,.85) -1.1em -1.1em 0 0,
        rgba(255,255,255,.85) 0 -1.5em 0 0,
        rgba(255,255,255,.85) 1.1em -1.1em 0 0;
}
@keyframes wpsr-spinner {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ── Icons ─────────────────────────────────────────────────── */
.settings_page_seo-redirection .info_icon    { width:20px;height:20px;background:url(images/large-info.png) center/contain no-repeat;float:left;margin:0 7px 0 0; }
.settings_page_seo-redirection .warning_icon { width:20px;height:20px;background:url(images/dialog-warning.png) center/contain no-repeat;float:left;margin:0 7px 0 0; }
.settings_page_seo-redirection .success_icon { width:20px;height:20px;background:url(images/action_success.png) center/contain no-repeat;float:left;margin:0 7px 0 0; }
.settings_page_seo-redirection .failure_icon { width:20px;height:20px;background:url(images/error.png) center/contain no-repeat;float:left;margin:0 7px 0 0; }
.settings_page_seo-redirection .del_template  { width:16px;height:16px;background:url(images/delete.png) no-repeat center/contain;display:inline-block; }
.settings_page_seo-redirection .edit_template { width:16px;height:16px;background:url(images/edit.png) no-repeat center/contain;display:inline-block; }
.settings_page_seo-redirection .go_link_template { width:16px;height:16px;background:url(images/go_link.png) no-repeat center/contain;display:inline-block; }

/* ── Help / validation ─────────────────────────────────────── */
.settings_page_seo-redirection .help-block { display:block;color:var(--wpsr-red);font-weight:600;font-size:12px;margin-top:3px; }
.settings_page_seo-redirection .hint_text  { color:var(--wpsr-text3);font-size:12px; }
.settings_page_seo-redirection .bcheckbox  { display:inline !important; }
.settings_page_seo-redirection a.help_link { line-height:24px;background:url(images/help_off.png) no-repeat left center;padding-left:28px;float:right;text-decoration:none;font-size:12px; }
.settings_page_seo-redirection a.help_link:hover { background:url(images/help_over.png) no-repeat left center; }

/* ── Import / export ───────────────────────────────────────── */
.settings_page_seo-redirection .import_link_wrap { margin-top:12px; }
.settings_page_seo-redirection .import_msg.success { background:var(--wpsr-green-bg);border:1px solid var(--wpsr-green-border);color:var(--wpsr-green-text);border-radius:var(--wpsr-radius);padding:10px 14px;font-size:13px;display:block; }
.settings_page_seo-redirection .import_msg.error   { background:#fef2f2;border:1px solid #fca5a5;color:#991b1b;border-radius:var(--wpsr-radius);padding:10px 14px;font-size:13px;display:block; }
.settings_page_seo-redirection .progress_wrap { display:block;margin-top:10px; }
.settings_page_seo-redirection .progress_wrap .progress { display:block;width:100%;background:var(--wpsr-bg3);border-radius:99px;height:20px;overflow:hidden; }
.settings_page_seo-redirection .progress_wrap .progress-bar { background:var(--wpsr-accent);height:100%;padding:2px 8px;color:#fff;font-size:12px;text-align:right;box-sizing:border-box;transition:width .4s; }

/* ── Premium tab — green ───────────────────────────────────── */
.settings_page_seo-redirection ul.tabs li:last-child a {
    color: #16a34a !important;
    font-weight: 600;
}
.settings_page_seo-redirection ul.tabs li:last-child.active a {
    color: #15803d !important;
    border-bottom-color: #16a34a !important;
}
.settings_page_seo-redirection ul.tabs li:last-child a:hover {
    color: #15803d !important;
}

/* ── Table column widths: wide From/To, actions far right ──── */
.settings_page_seo-redirection .wp-list-table th:nth-child(2),
.settings_page_seo-redirection .wp-list-table td:nth-child(2),
.settings_page_seo-redirection .grid thead td:nth-child(2),
.settings_page_seo-redirection .grid tbody td:nth-child(2) {
    width: 28% !important;
    min-width: 180px;
}
.settings_page_seo-redirection .wp-list-table th:nth-child(3),
.settings_page_seo-redirection .wp-list-table td:nth-child(3),
.settings_page_seo-redirection .grid thead td:nth-child(3),
.settings_page_seo-redirection .grid tbody td:nth-child(3) {
    width: 28% !important;
    min-width: 180px;
}
.settings_page_seo-redirection .wp-list-table th:last-child,
.settings_page_seo-redirection .wp-list-table td:last-child,
.settings_page_seo-redirection .grid thead td:last-child,
.settings_page_seo-redirection .grid tbody td:last-child {
    text-align: right !important;
    white-space: nowrap;
}

/* ── Misc ──────────────────────────────────────────────────── */
.settings_page_seo-redirection hr { border:none;border-bottom:1px solid var(--wpsr-border);margin:16px 0; }
.settings_page_seo-redirection input.chkall { margin-left:0 !important; }
.settings_page_seo-redirection #myform .cform select { height:34px !important;vertical-align:middle; }
.settings_page_seo-redirection #tab1 .pagination.tablenav-page { float:right; }
