/*
 * Advanced Redirect Manager - Admin Stylesheet
 * Version: 1.1.0 (UI Overhaul)
 */

/* --- General & Table Styles --- */
#arm-wrap .nav-tab-wrapper {
    margin-bottom: 20px;
}

#arm-redirects-table .arm-status {
    padding: 3px 8px;
    border-radius: 4px;
    color: #fff;
    font-weight: 600;
    font-size: 11px;
    display: inline-block;
    white-space: nowrap;
}
#arm-redirects-table .arm-status-301 { background-color: #0073aa; }
#arm-redirects-table .arm-status-302 { background-color: #36a359; }
#arm-redirects-table .arm-status-307 { background-color: #d63638; }
#arm-redirects-table .arm-status-308 { background-color: #5b2a8a; }
#arm-redirects-table .arm-status-410 { background-color: #1d2327; }
#arm-redirects-table .arm-status-451 { background-color: #b02a2a; }
#arm-redirects-table .arm-status-off { background-color: #777; }

/* Column Width Optimization */
#arm-redirects-table th.column-id,
#arm-redirects-table td.column-id {
    width: 5%;
}
#arm-redirects-table th.column-status,
#arm-redirects-table td.column-status {
    width: 10%;
}
#arm-redirects-table th.column-from,
#arm-redirects-table td.column-from {
    width: 35%;
}
#arm-redirects-table th.column-to,
#arm-redirects-table td.column-to {
    width: 35%;
}
#arm-redirects-table th.column-hits,
#arm-redirects-table td.column-hits {
    width: 5%;
    text-align: center;
}
#arm-redirects-table th.column-actions,
#arm-redirects-table td.column-actions {
    width: 10%;
}
#arm-redirects-table .url-from code,
#arm-redirects-table .url-to code {
    word-break: break-all;
}

/* --- Modal Styles --- */
#arm-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}
#arm-modal-backdrop.arm-modal-hidden {
    display: none;
}
#arm-modal-wrap {
    background: #f0f0f1;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    width: 95%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
}
#arm-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
}
#arm-modal-header h2 {
    margin: 0;
    font-size: 1.3em;
}
#arm-modal-header #arm-modal-close {
    color: #666;
}
#arm-modal-content {
    padding: 0 20px;
    background: #fff;
}
#arm-modal-content .form-table {
    margin-top: 0;
}
#arm-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}
#arm-modal-footer .spinner {
    float: none;
    margin-left: 10px;
}

/* Smart Search Styles */
.arm-smart-search-wrapper {
    position: relative;
}
#arm-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #8c8f94;
    border-top: none;
    z-index: 100001;
    margin: 0;
    padding: 0;
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-height: 100px;
    overflow-y: auto;     
}
#arm-search-results li {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}
#arm-search-results li:last-child {
    border-bottom: none;
}
#arm-search-results li:hover,
#arm-search-results li.highlighted {
    background-color: #0073aa;
    color: #fff;
}
#arm-search-results li .result-type {
    font-size: 10px;
    text-transform: uppercase;
    background: #ccc;
    color: #333;
    padding: 2px 5px;
    border-radius: 3px;
    margin-right: 8px;
}
#arm-search-results li:hover .result-type,
#arm-search-results li.highlighted .result-type {
    background: #fff;
    color: #0073aa;
}

/* --- Tools, Scanner, Support Tabs (unchanged) --- */
/* [Tutto il resto del CSS rimane qui] */
.arm-tool-card, .arm-link-scanner-container .arm-tool-card {
    background: #fff; border: 1px solid #c3c4c7; box-shadow: 0 1px 1px rgba(0,0,0,.04); padding: 20px; margin-top: 20px;
}
.arm-tool-card h2 { margin-top: 0; padding-bottom: 10px; border-bottom: 1px solid #ddd; }
.arm-tool-card .arm-bulk-action { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; border-bottom: 1px solid #eee; }
.arm-tool-card .arm-bulk-action:last-child { border-bottom: none; }
.arm-tool-card .arm-bulk-action p { margin: 0; padding-right: 20px; }
.arm-danger-zone { border-left: 4px solid #d63638; }
.arm-danger-zone .arm-danger-text { color: #d63638; font-weight: bold; }
.button.button-delete { background: #d63638; border-color: #b02a2a; color: #fff; }
.button.button-delete:hover { background: #c32d2e; border-color: #b02a2a; color: #fff; }
#arm-scanner-progress { margin-top: 20px; }
.arm-progress-bar { width: 100%; height: 20px; background-color: #e0e0e0; border-radius: 4px; overflow: hidden; border: 1px solid #c3c4c7; }
.arm-progress-bar-inner { height: 100%; width: 0; background-color: #0073aa; transition: width 0.3s ease-in-out; }
.arm-progress-bar-inner.finished { background-color: #4caf50; }
.arm-progress-text { margin-top: 5px; font-style: italic; color: #555; }
.arm-link-status { padding: 3px 8px; border-radius: 4px; color: #fff; font-weight: 600; font-size: 11px; }
.arm-link-status.status-ok { background-color: #36a359; }
.arm-link-status.status-warning { background-color: #ffb900; }
.arm-link-status.status-error { background-color: #d63638; }
.arm-support-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 20px; }
.arm-support-card { background: #fff; border: 1px solid #c3c4c7; box-shadow: 0 1px 1px rgba(0,0,0,.04); padding: 20px; text-align: center; }
.arm-support-card .dashicons { font-size: 48px; width: 48px; height: 48px; color: #0073aa; margin-bottom: 15px; }
.arm-support-card h3 { margin: 0 0 15px; font-size: 1.2em; }
.arm-support-card p { flex-grow: 1; margin-bottom: 20px; }

/* --- Icon Action Buttons --- */
.arm-icon-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}
.arm-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #50575e;
    padding: 5px;
    margin: 0 2px;
    border-radius: 50%;
    transition: all 0.2s ease-in-out;
}
.arm-action-btn:hover {
    background-color: #e0e0e0;
    color: #0073aa; /* WordPress Blue */
}
.arm-action-btn .dashicons {
    font-size: 18px;
    vertical-align: middle;
}
.arm-action-btn.arm-delete-btn:hover {
    color: #d63638; /* WordPress Red */
}

/* Aggiungi questo alla fine del tuo file CSS */

/* --- Help Toggle Styles --- */
.arm-help-toggle-wrap {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px 15px;
    margin: 20px 0;
}

.arm-help-toggle-link {
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    color: #0073aa;
    display: flex;
    align-items: center;
}

.arm-help-toggle-link .dashicons {
    margin-right: 5px;
    transition: transform 0.2s ease-in-out;
}

.arm-help-toggle-link.active .dashicons {
    transform: rotate(90deg);
}

.arm-help-content {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
    color: #3c434a;
}
.arm-help-content h4 {
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}
.arm-help-content h5 {
    font-size: 1.1em;
    font-weight: 600;
    margin-top: 25px;
    margin-bottom: 10px;
}
.arm-help-content ul {
    list-style: disc;
    margin-left: 20px;
}
.arm-help-content code {
    background: #e7e7e7;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 13px;
}

/*
=====================================================
  Stili per la Tab "NewCodeByte Apps"
=====================================================
*/

/* 1. Il contenitore, ora usa Flexbox */
.newcodebyte-plugins-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

/* 2. La singola card */
.plugin-card {
    flex: 1 1 350px;
    max-width: 550px; 
    background: #fff;
    border: 1px solid #c3c4c7;
    padding: 20px;
    border-radius: 4px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

/* 3. L'icona del plugin */
.plugin-card .plugin-icon-img {
    width: 125px;
    height: auto;
    border-radius: 8px;
    flex-shrink: 0;
}

/* 4. Il contenitore del testo */
.plugin-card .plugin-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.plugin-card .plugin-info h3 {
    margin: 0 0 8px 0;
    font-size: 1.2em; /* Dimensione del titolo della card */
}

.plugin-card .plugin-info p {
    margin: 0;
    flex-grow: 1; /* Fa in modo che il paragrafo occupi lo spazio disponibile */
}

.plugin-card .plugin-info .plugin-links {
    margin-top: 15px;
}