/* Admin styles */
.wrap.olm-wrap {
    background: #fff;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.olm-scan-progress-bar, .olm-internal-scan-progress-bar {
    width: 100%;
    background-color: #f0f0f1;
    height: 20px;
    border-radius: 3px;
    margin-top: 10px;
    display: none;
}
.olm-scan-progress-value, .olm-internal-scan-progress-value {
    width: 0%;
    height: 100%;
    background-color: #2271b1;
    transition: width 0.3s ease;
}

/* View links button */
.olm-view-links {
    cursor: pointer;
    transition: all 0.2s ease;
}

.olm-view-links:hover {
    background-color: #2271b1;
    color: white;
    border-color: #2271b1;
}

.olm-view-links .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Modal styles */
.olm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 100000;
    overflow-y: auto;
}

.olm-modal-content {
    background: #fff;
    width: 90%;
    max-width: 900px;
    margin: 50px auto;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.olm-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #2271b1;
    color: white;
}

.olm-modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.olm-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.olm-modal-close:hover {
    opacity: 1;
}

.olm-modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.olm-modal-footer {
    padding: 15px 20px;
    background: #f0f0f1;
    text-align: right;
    border-top: 1px solid #ddd;
}

/* Internal links table */
#olm-internal-links-table {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

#olm-internal-links-table thead th {
    background: #f0f0f1;
    font-weight: 600;
    padding: 12px 15px;
    text-align: left;
    border-bottom: 2px solid #ddd;
}

#olm-internal-links-table tbody td {
    padding: 12px 15px;
    vertical-align: middle;
}

#olm-internal-links-table tbody tr:hover {
    background-color: #f7f7f7;
}

#olm-internal-links-table .olm-link-number {
    font-weight: 600;
    color: #666;
    text-align: center;
}

#olm-internal-links-table .olm-link-url {
    word-break: break-all;
}

#olm-internal-links-table .olm-link-url a {
    color: #2271b1;
    text-decoration: none;
}

#olm-internal-links-table .olm-link-url a:hover {
    text-decoration: underline;
}

#olm-internal-links-table .olm-link-anchor {
    font-style: italic;
    color: #555;
}

#olm-internal-links-table .olm-link-anchor.empty {
    color: #999;
    font-style: normal;
}

/* Statistics boxes */
.olm-stats-wrapper {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.olm-stat-box {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.olm-stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,.1) !important;
}

/* Stats wrapper layout */
.olm-stats-wrapper {
    margin: 20px 0;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Stat box card */
.olm-stat-box {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 15px 20px;
    flex: 1;
    min-width: 200px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

/* Stat number */
.olm-stat-number {
    font-size: 28px;
    font-weight: 600;
}

.olm-stat-number-blue   { color: #2271b1; }
.olm-stat-number-green  { color: #46b450; }
.olm-stat-number-red    { color: #dc3232; }
.olm-stat-number-gray   { color: #50575e; }

/* Stat label */
.olm-stat-label {
    color: #646970;
    font-size: 13px;
    margin-top: 5px;
}

/* Chart / distribution block */
.olm-chart-block {
    margin: 0 0 25px 0;
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    max-width: 500px;
}

.olm-chart-title {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #1d2327;
}

.olm-chart-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.olm-chart-bar-wrap {
    flex: 1;
}

.olm-chart-bar-outer {
    display: flex;
    height: 30px;
    border-radius: 4px;
    overflow: hidden;
    background: #f0f0f1;
}

.olm-chart-legend {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    font-size: 12px;
    color: #646970;
}

.olm-chart-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.olm-chart-legend-swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.olm-chart-swatch-green { background: #46b450; }
.olm-chart-swatch-red   { background: #dc3232; }

/* Chart bar segment (dynamic width set inline, colour from class) */
.olm-chart-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    min-width: 35px;
}

.olm-chart-segment-green { background: #46b450; }
.olm-chart-segment-red   { background: #dc3232; }

/* Tab action areas */
.olm-tab-actions {
    margin: 20px 0;
}

/* Margin-top helpers for descriptions */
.olm-desc-mt5        { margin-top: 5px; }
.olm-desc-mt10       { margin-top: 10px; }
.olm-desc-search-box { margin-top: -10px; margin-bottom: 10px; }

/* Inline button spacing */
.olm-btn-ml10 { margin-left: 10px; }
.olm-btn-mt5  { margin-top: 5px; }
.olm-btn-mt10 { margin-top: 10px; }

/* Danger / destructive button */
.olm-btn-danger {
    color: #b32d2e;
    border-color: #b32d2e;
}

/* Delete-broken-links button */
.olm-btn-delete-broken {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

/* Delete-all-comments button */
.olm-btn-delete-comments {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

/* Dashicon inside a button, vertically centred */
.olm-dashicon-inline {
    vertical-align: middle;
    margin-top: 3px;
}

/* Progress bars (check links / traffic sync) */
.olm-check-progress-bar,
.olm-traffic-sync-progress-bar {
    display: none;
    width: 100%;
    background-color: #f0f0f1;
    height: 20px;
    border-radius: 3px;
    margin-top: 10px;
}

.olm-check-progress-value,
.olm-traffic-sync-progress-value {
    width: 0%;
    height: 100%;
    background-color: #2271b1;
    transition: width 0.3s ease;
}

/* Delete-traffic confirmation modal */
.olm-confirm-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 100000;
    align-items: center;
    justify-content: center;
}

.olm-confirm-modal-box {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    text-align: center;
}

.olm-confirm-modal-icon {
    margin-bottom: 20px;
}

.olm-confirm-modal-icon .dashicons {
    font-size: 48px;
    color: #d63638;
    width: 48px;
    height: 48px;
}

.olm-confirm-modal-title {
    margin: 0 0 10px;
    font-size: 18px;
}

.olm-confirm-modal-desc {
    color: #50575e;
    margin: 0 0 15px;
    font-size: 14px;
    line-height: 1.5;
}

.olm-confirm-modal-redirect {
    text-align: left;
    margin: 0 0 20px;
    padding: 15px;
    background: #f0f0f1;
    border-radius: 4px;
}

.olm-confirm-modal-redirect label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 13px;
    color: #1d2327;
}

.olm-confirm-modal-redirect .dashicons {
    font-size: 16px;
    vertical-align: text-bottom;
}

.olm-confirm-modal-redirect input[type="url"] {
    width: 100%;
    padding: 6px 8px;
    font-size: 13px;
}

.olm-confirm-modal-redirect p {
    margin: 6px 0 0;
    font-size: 12px;
    color: #757575;
}

.olm-confirm-modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.olm-confirm-modal-buttons .button {
    min-width: 120px;
}

.olm-btn-confirm-delete {
    background: #d63638;
    border-color: #d63638;
    color: #fff;
}

/* Settings tab */
.olm-settings-section { margin: 20px 0; }

.olm-settings-h3-mt { margin-top: 30px; }

.olm-auth-mode-section { transition: opacity 0.2s ease; }

.olm-settings-hr { margin: 30px 0; }

.olm-settings-list {
    list-style: disc;
    margin-left: 25px;
}

.olm-settings-warning-box {
    margin: 20px 0;
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
}

.olm-settings-warning-box p {
    margin: 0 0 10px 0;
    color: #856404;
}

/* Debug section */
.olm-debug-row {
    margin: 20px 0;
}

.olm-debug-label {
    margin-right: 5px;
    font-weight: bold;
}

.olm-debug-post-id-input {
    width: 100px;
}

.olm-debug-results {
    display: none;
    margin: 20px 0;
    background: #f0f0f1;
    padding: 20px;
    border-radius: 4px;
    border-left: 4px solid #2271b1;
}

.olm-debug-results h3 {
    margin-top: 0;
}

/* API test results panel */
.olm-api-test-results {
    display: none;
    margin-top: 15px;
    padding: 15px;
    background: #f0f0f1;
    border-left: 4px solid #2271b1;
}

.olm-api-test-results h4 {
    margin-top: 0;
}

/* Connection status labels */
.olm-status-connected {
    color: #46b450;
    font-weight: bold;
}

.olm-status-pending {
    color: #ffb900;
}

.olm-status-not-configured {
    color: #dc3232;
}

/* Google button spacing */
.olm-google-btn-mt { margin-top: 10px; }
.olm-google-btn-mr { margin-right: 10px; }

/* Copy redirect URI button */
.olm-copy-btn-mt { margin-top: 5px; }

/* Edit link modal (simple) */
.olm-edit-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
}

.olm-edit-modal-box {
    background: #fff;
    width: 500px;
    margin: 100px auto;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.olm-edit-modal-footer {
    margin-top: 15px;
    text-align: right;
}

/* Modal loading / empty state */
.olm-modal-loading {
    text-align: center;
    padding: 30px;
}

.olm-modal-loading .spinner {
    float: none;
}

.olm-modal-table-hidden {
    display: none;
}

.olm-modal-empty {
    display: none;
    text-align: center;
    padding: 30px;
    color: #666;
}

/* Modal table narrow first column */
.olm-modal-col-num {
    width: 50px;
}

/* Status / count classes for list tables */
.olm-status-unchecked {
    color: #999;
}

.olm-status-ok {
    color: #46b450;
    font-weight: bold;
}

.olm-status-redirect {
    color: #ffb900;
    font-weight: bold;
}

.olm-status-error {
    color: #dc3232;
    font-weight: bold;
}

.olm-count-zero {
    color: #999;
}

.olm-orphan-label {
    color: #dc3232;
    font-weight: bold;
}

/* Traffic count styles */
.olm-traffic-count-internal {
    font-weight: 600;
    color: #2271b1;
}

.olm-traffic-count-outbound {
    font-weight: 600;
    color: #b32d2e;
}

.olm-traffic-count-zero-internal {
    color: #d63638;
    font-weight: 600;
}

/* Text muted (Never / dash placeholders) */
.olm-text-muted {
    color: #999;
}

/* Trash icon in traffic delete button */
.olm-trash-icon {
    font-size: 14px;
    line-height: 1.8;
}

/* Content Pruning Pro tab */
.olm-tab-pro {
    background: #0f172a !important;
    color: #fff !important;
    border-color: #0f172a !important;
}
.olm-tab-pro:hover,
.olm-tab-pro:focus {
    background: #1e293b !important;
    color: #fff !important;
    border-color: #1e293b !important;
}

/* SEO Pilote promotion box */
.olm-promo-box {
    background: #f0f6fc;
    border: 1px solid #c3c4c7;
    border-left: 4px solid #2271b1;
    border-radius: 4px;
    padding: 16px 20px;
    margin-top: 20px;
}

.olm-promo-title {
    margin: 0 0 8px;
    font-size: 14px;
    color: #1d2327;
}

.olm-promo-content p {
    margin: 0 0 12px;
    color: #50575e;
}
