/*
 * Media Optimizer - Admin Panel Styles v1.0.0
*/

/* === Import Fonts === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* === Token Definitions === */
:root {
    --mo-primary: #266df0;
    --mo-primary-light: #538bf3;
    --mo-danger: #dc3545;
    --mo-text-darkest: #1d1d1f;
    --mo-text-dark: #424245;
    --mo-text-medium: #86868b;
    --mo-white: #ffffff;
    --mo-bg-light: #f5f5f7;
    --mo-bg-border: #e8e8ed;
    --mo-font-heading: 'Inter', -apple-system, sans-serif;
    --mo-font-body: 'Inter', -apple-system, sans-serif;
    --mo-shadow-soft: rgba(0, 0, 0, 0.05) 0px 4px 12px;
    --mo-radius: 12px;
}

/* === General Wrapper and Layout === */
.wrap.mo-wrap { margin: 20px 20px 20px 0; font-family: var(--mo-font-body); }

.mo-header {
    background: var(--mo-white);
    padding: 20px 25px;
    margin: 0;
    border-bottom: 1px solid var(--mo-bg-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mo-header__logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mo-header__logo .mo-logo-svg {
    width: 40px;
    height: 40px;
}

.mo-header__logo h1 {
    font-family: var(--mo-font-heading);
    font-size: 20px; 
    font-weight: 600; 
    color: var(--mo-text-darkest);
    margin: 0;
    line-height: 1;
}

.mo-header__version {
    font-size: 12px;
    font-weight: 500;
    color: var(--mo-text-medium);
    background-color: var(--mo-bg-light);
    border: 1px solid var(--mo-bg-border);
    padding: 4px 10px;
    border-radius: 20px;
}

/* === Tabs (Modern, Professional Style) === */
.mo-tabs-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    background-color: var(--mo-white);
    padding: 15px 25px 0;
    border-bottom: 1px solid var(--mo-bg-border);
}

.mo-tab-link {
    font-family: var(--mo-font-heading);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 18px;
    background-color: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--mo-text-medium);
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    margin-bottom: -1px;
}

.mo-tab-link:hover {
    background-color: var(--mo-bg-light);
    color: var(--mo-text-darkest);
    border-bottom-color: #c8d7e4;
    border-radius: 8px 8px 0 0;
}

.mo-tab-link.is-active,
.mo-tab-link.is-active:hover {
    background-color: var(--mo-white);
    color: var(--mo-primary);
    border-bottom-color: var(--mo-primary);
    font-weight: 600;
    border-radius: 8px 8px 0 0;
}

/* === Content and Settings Sections === */
.mo-content { background-color: var(--mo-bg-light); padding: 20px; }
.mo-content form > h2 { font-family: var(--mo-font-heading); font-size: 24px; font-weight: 600; color: var(--mo-text-darkest); margin: 20px 0; padding: 0 10px; }

.mo-content .form-table { background: var(--mo-white); border: 1px solid var(--mo-bg-border); border-radius: var(--mo-radius); box-shadow: var(--mo-shadow-soft); margin-top: 0; border-collapse: collapse; width: 100%; }
.mo-content .form-table tr { border-bottom: 1px solid var(--mo-bg-border); }
.mo-content .form-table tr:last-child { border-bottom: none; }
.mo-content .form-table th { padding: 25px; font-size: 14px; font-weight: 500; color: var(--mo-text-dark); width: 280px; border-right: 1px solid var(--mo-bg-border); }
.mo-content .form-table td { padding: 25px; vertical-align: top; }
.mo-content p.description { font-size: 13px; color: var(--mo-text-medium); margin-top: 8px; }

/* === Form Fields === */
.mo-content input[type="text"], .mo-content input[type="number"], .mo-content textarea { background: var(--mo-bg-light); border: 1px solid var(--mo-bg-border); border-radius: 8px; padding: 10px 12px; box-shadow: none; transition: all 0.2s ease; }
.mo-content input[type="text"]:focus, .mo-content input[type="number"]:focus, .mo-content textarea:focus { border-color: var(--mo-primary); box-shadow: 0 0 0 3px rgba(38, 109, 240, 0.15); background: var(--mo-white); }

/* === Buttons === */
.mo-wrap .button-primary { background-color: var(--mo-primary); color: var(--mo-white); border-color: var(--mo-primary); padding: 12px 24px; height: auto; font-size: 14px; font-weight: 500; border-radius: var(--mo-radius); box-shadow: 0 2px 5px rgba(38, 109, 240, 0.2); transition: all 0.2s ease; }
.mo-wrap .button-primary:hover { background-color: var(--mo-primary-light); border-color: var(--mo-primary-light); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(38, 109, 240, 0.3); }

/* === NEW: API Widget Button Styles === */
.mo-api-widget .mo-api-input-group {
    align-items: stretch; 
}

.mo-api-widget .mo-api-input-group .button-primary {
    padding: 0 24px !important;
    height: 40px !important;
    line-height: 40px !important;
    box-shadow: var(--mo-shadow-soft) !important;
    transform: none !important;
}

.mo-api-widget .mo-api-input-group .button-primary:hover {
    transform: none !important;
    box-shadow: var(--mo-shadow-soft) !important;
}

.mo-api-widget .mo-disconnect-btn {
    text-decoration: none !important;
    box-shadow: none !important;
    border: none !important;
    background: none !important;
    margin-left: 10px !important;
    padding: 0 !important;
    color: var(--mo-danger) !important;
    align-self: center;
}

.mo-api-widget .mo-disconnect-btn:hover {
    color: #a61b29 !important;
}

/* === Watermark Preview Styles === */
.mo-watermark-preview-area {
    position: relative;
    max-width: 100%;
    border: 1px solid var(--mo-bg-border);
    border-radius: 8px;
    overflow: hidden;
    line-height: 0;
    aspect-ratio: 16 / 9;
    background-color: #cccccc;
}

#mo-watermark-sample-bg {
    width: 100%;
    height: auto;
    display: block;
}

#mo-watermark-preview-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* === Watermark Page Redesign === */
.mo-watermark-uploader {
    display: flex;
    align-items: center;
    gap: 20px;
}
.mo-watermark-preview {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    background-color: var(--mo-bg-light);
    border: 1px solid var(--mo-bg-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.mo-watermark-preview img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}
.mo-watermark-preview .placeholder {
    font-size: 13px;
    color: var(--mo-text-medium);
}
.mo-watermark-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}
.mo-watermark-controls .button {
    margin: 0 !important;
}
.mo-watermark-controls .button-link {
    text-decoration: none;
    box-shadow: none !important;
    padding: 0 !important;
}

.mo-watermark-bg-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.mo-watermark-bg-control {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
}
.mo-watermark-bg-control input[type="color"] {
    width: 50px;
    height: 30px;
    padding: 2px;
    border: 1px solid var(--mo-bg-border);
    border-radius: 4px;
    cursor: pointer;
}

/* Conditional UI for Watermark Mode */
.is-hidden {
    display: none !important;
}
.mo-radio-group {
    display: flex;
    gap: 15px;
}
.mo-radio-group label {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* === Badges === */
.mo-badge { display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; }
.mo-badge--danger { background: var(--mo-danger); color: var(--mo-white); }

/* === Toggle Switch === */
.mo-toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; vertical-align: middle; }
.mo-toggle-switch input { opacity: 0; width: 0; height: 0; }
.mo-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #dcdcde; transition: .3s; border-radius: 24px; }
.mo-slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .3s; border-radius: 50%; box-shadow: 0 1px 2px rgba(0,0,0,0.2); }
input:checked + .mo-slider { background-color: var(--mo-primary); }
input:checked + .mo-slider:before { transform: translateX(20px); }

/* === Modern Checkbox Styles === */
.mo-checkbox-group label,
.mo-checkbox-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--mo-text-dark);
    position: relative; 
    padding-left: 28px; 
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.mo-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.mo-checkbox-group label::before,
.mo-checkbox-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 20px;
    background-color: var(--mo-bg-light);
    border: 1px solid var(--mo-bg-border);
    border-radius: 6px;
    transition: all 0.2s ease-in-out;
}

.mo-checkbox-group label::after,
.mo-checkbox-label::after {
    content: '';
    position: absolute;
    display: none;
    left: 7px;
    top: 50%;
    width: 5px;
    height: 10px;
    border: solid var(--mo-white);
    border-width: 0 2px 2px 0;
    transform: translateY(-50%) rotate(45deg);
    transform-origin: center center;
}

.mo-checkbox:hover + span, 
.mo-checkbox-group label:hover::before,
.mo-checkbox-label:hover::before {
    border-color: var(--mo-primary);
}

.mo-checkbox:checked + span, 
.mo-checkbox:checked ~ .mo-checkbox-label::before,
.mo-checkbox-group input:checked + span::before,
.mo-checkbox-group input:checked ~ label::before,
.mo-checkbox-group label:has(input:checked)::before {
    background-color: var(--mo-primary);
    border-color: var(--mo-primary);
}

.mo-checkbox:checked + span::after,
.mo-checkbox:checked ~ .mo-checkbox-label::after,
.mo-checkbox-group input:checked + span::after,
.mo-checkbox-group input:checked ~ label::after,
.mo-checkbox-group label:has(input:checked)::after {
    display: block;
}

.mo-checkbox-group.is-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* === Quality Slider === */
.mo-quality-slider-container { padding: 10px 0; }
.mo-quality-slider { position: relative; height: 24px; margin: 10px 10px 0; }
.mo-quality-slider-track { position: absolute; top: 50%; left: 0; right: 0; height: 4px; background-color: var(--mo-bg-border); border-radius: 2px; transform: translateY(-50%); }
.mo-quality-slider-option { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 24px; height: 24px; z-index: 2; }
.mo-quality-slider-option input[type="radio"] { display: none; }
.mo-quality-slider-option label { display: block; width: 100%; height: 100%; border-radius: 50%; border: 3px solid var(--mo-bg-border); background-color: var(--mo-white); cursor: pointer; transition: all 0.2s; }
.mo-quality-slider-option label:hover { border-color: var(--mo-primary); }
.mo-quality-slider-option input[type="radio"]:checked + label { border-color: var(--mo-primary); background-color: var(--mo-primary); }
.mo-quality-slider-labels { display: flex; justify-content: space-between; margin: 20px 0 0; font-size: 13px; line-height: 1.4; color: var(--mo-text-medium); }
.mo-quality-slider-labels div { width: 30%; }
.mo-quality-slider-labels div:first-child { text-align: left; }
.mo-quality-slider-labels div:nth-child(2) { text-align: center; }
.mo-quality-slider-labels div:last-child { text-align: right; }
.mo-quality-slider-labels strong { color: var(--mo-text-darkest); font-weight: 600; }

/* === Bulk Optimization Page (BULK) - IMPROVED STYLES === */
.mo-content .card { background-color: var(--mo-white); padding: 25px 30px; border-radius: var(--mo-radius); box-shadow: var(--mo-shadow-soft); border: 1px solid var(--mo-bg-border); margin-bottom: 25px; }
#mo-start-bulk-btn { width: auto; min-width: 250px; }
#mo-bulk-status .spinner { vertical-align: middle; }
#mo-bulk-error-log { border: 1px solid #d63638; color: #d63638; border-radius: var(--mo-radius); }
.mo-progress-circles { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px; padding: 20px; }
.mo-circle-wrap { position: relative; width: 200px; height: 200px; text-align: center; }
.mo-circle-chart { width: 100%; height: 100%; }
.mo-circle-bg { fill: none; stroke: var(--mo-bg-border); stroke-width: 3.8; }
.mo-circle {
    fill: none;
    stroke: #4caf50;
    stroke-width: 3.8;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dasharray 0.5s ease;
}
.mo-circle.mo-circle-avif {
    stroke: #9c27b0;
}
.mo-circle-text { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.mo-circle-percent { font-family: var(--mo-font-heading); font-size: 2.5em; font-weight: 600; color: var(--mo-text-darkest); }
.mo-circle-label { font-size: 0.9em; color: var(--mo-text-dark); margin-top: 5px; }
.mo-circle-subtext { font-size: 0.8em; color: var(--mo-text-medium); }
.mo-circle-pro-info { font-size: 0.7em; color: var(--mo-text-medium); margin-top: 10px; }

/* === Promotional Notice Card Style === */
.notice.mo-promo-notice-card {
    background-color: #fff;
    border: 1px solid var(--mo-bg-border);
    border-radius: var(--mo-radius, 12px);
    padding: 0;
    margin-top: 20px;
    margin-right: 20px;
    box-shadow: var(--mo-shadow-soft, 0 4px 12px rgba(0,0,0,0.05));
}

.mo-promo-notice-wrapper {
    display: flex;
    align-items: flex-start;
    padding: 25px 30px;
    gap: 25px;
}

.mo-promo-notice-icon .dashicons {
    font-size: 42px;
    width: 42px;
    height: 42px;
    color: var(--mo-primary, #266df0);
}

.mo-promo-notice-content h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--mo-text-darkest, #1d1d1f);
}

.mo-promo-notice-content p {
    margin: 0 0 15px;
    font-size: 14px;
    color: var(--mo-text-dark, #424245);
    line-height: 1.6;
}

.mo-promo-notice-content p.mo-promo-offer {
    font-size: 16px;
    font-weight: 500;
    color: var(--mo-text-darkest, #1d1d1f);
    background-color: var(--mo-bg-light, #f5f5f7);
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid var(--mo-bg-border, #e8e8ed);
}

.mo-promo-code-area {
    margin-top: 20px;
    background-color: var(--mo-bg-light, #f5f5f7);
    padding: 15px;
    border-radius: 8px;
}

.mo-promo-code-area p {
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--mo-text-medium, #86868b);
}

.mo-promo-code-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mo-promo-code {
    flex-grow: 1;
    background-color: #fff;
    border: 1px dashed #b8b8b8;
    padding: 8px 15px;
    font-family: monospace;
    font-size: 16px;
    font-weight: bold;
    border-radius: 4px;
}

.mo-copy-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

/* === Modal Deaktywacyjny === */
.mo-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.mo-modal-content {
    background: #fff;
    padding: 25px 30px;
    border-radius: 4px;
    width: 95%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.mo-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    line-height: 1;
}

.mo-modal-header h3 {
    margin: 0 0 10px;
    font-size: 1.2em;
    font-weight: 600;
}
.mo-modal-header p {
    margin: 0;
    font-size: 14px;
    color: #555;
}

.mo-modal-body {
    margin: 25px 0;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    padding: 25px 0;
}

.mo-feedback-reasons {
    list-style: none;
    margin: 0;
    padding: 0;
}
.mo-feedback-reasons li {
    margin-bottom: 12px;
}
.mo-feedback-reasons label {
    display: flex;
    align-items: center;
    font-size: 14px;
}
.mo-feedback-reasons input[type="radio"] {
    margin-right: 10px;
}

#mo-other-reason {
    width: 100%;
    margin-top: 10px;
    padding: 8px;
    box-sizing: border-box;
}

.mo-deactivation-warning {
    background-color: #fce4e4;
    border: 1px solid #dc3232;
    color: #444;
    padding: 12px;
    margin-top: 20px;
    border-radius: 3px;
}
.mo-deactivation-warning a {
    text-decoration: none;
}

.mo-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* === "Go PRO" link on the Plugins page === */
.plugins tr[data-plugin*="dropavif-media-optimizer.php"] .row-actions .mo-pro-link {
    font-weight: bold;
    color: #266df0; 
}

.plugins tr[data-plugin*="dropavif-media-optimizer.php"] .row-actions .mo-pro-link:hover {
    color: #538bf3; 
}

/* === Media Library Stats Column === */
.mo-media-col-stats {
    font-size: 12px;
    line-height: 1.6;
}

.mo-media-col-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mo-media-col-list li {
    margin-bottom: 4px;
}
.mo-media-col-list li:last-child {
    margin-bottom: 0;
}

.mo-media-col-list .mo-stat-original strong {
    color: var(--mo-text-darkest);
}

.mo-media-col-list .mo-stat-webp {
    color: #0073aa; 
}

.mo-media-col-list .mo-stat-avif {
    color: #9c27b0; 
}

.mo-media-col-comparison {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--mo-bg-border);
    font-weight: 600;
    color: #4caf50;
}

.mo-media-col-actions {
    margin-top: 8px;
}

/* === PRO Feature Notice === */
.mo-premium-notice {
    margin-top: 10px;
    padding: 10px 15px;
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f7 100%);
    border-left: 4px solid #fad648;
    border-radius: var(--mo-radius);
    font-size: 13px;
    font-weight: 500;
    color: var(--mo-text-darkest);
    display: flex;
    align-items: center;
    gap: 8px;
	max-width: 800px;
    box-shadow: var(--mo-shadow-soft);
}
.mo-premium-notice .dashicons {
    color: #fad648;
}

/* === Conflict Notice Styles === */
.notice.mo-conflict-notice {
    border-left-color: #d63638; 
    padding: 0;
    display: flex;
}

.notice.mo-conflict-notice.is-dismissible {
    padding-right: 38px;
}

.notice.mo-conflict-notice.is-dismissible .notice-dismiss {
    top: 10px;
}

.mo-conflict-notice-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 20px;
    width: 100%;
}

.mo-conflict-icon {
    margin-right: 15px;
}

.mo-conflict-icon .dashicons {
    font-size: 36px;
    width: 36px;
    height: 36px;
    color: #d63638;
}

.mo-conflict-content {
    flex: 1;
    min-width: 300px;
}

.mo-conflict-content h3 {
    margin: 0 0 10px;
    font-size: 1.1em;
    font-weight: 600;
}

.mo-conflict-content p {
    margin: 0 0 15px;
    font-size: 14px;
}

.mo-competitor-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-left: 3px solid #f8d7da;
    padding-left: 15px;
}

.mo-competitor-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-weight: 500;
}

.mo-competitor-list li:not(:last-child) {
    border-bottom: 1px solid #f1f1f1;
}

.mo-conflict-promo {
    flex-basis: 300px; 
    margin-left: 30px;
    padding-left: 30px;
    border-left: 1px solid #ddd;
}

.mo-conflict-promo h4 {
    margin: 0 0 8px;
    font-size: 1em;
    font-weight: 600;
    color: var(--mo-primary);
}

.mo-conflict-promo p {
    font-size: 13px;
    line-height: 1.5;
}

.mo-conflict-promo .button-primary {
    margin-top: 10px;
    width: 100%;
    text-align: center;
}

@media (max-width: 850px) {
    .mo-conflict-notice-wrapper {
        flex-direction: column;
    }
    .mo-conflict-promo {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid #ddd;
        flex-basis: auto;
        width: 100%;
    }
}

.mo-stats-cards-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }
    .mo-stat-card {
        background: var(--mo-white);
        border-radius: var(--mo-radius);
        padding: 25px;
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        border: 1px solid var(--mo-bg-border);
        box-shadow: var(--mo-shadow-soft);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
	.mo-stat-card:hover {
		transform: translateY(-3px);
		box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
	}
	.mo-stat-card-info {
		display: flex;
		flex-direction: column;
	}
    .mo-stat-card-icon .dashicons {
        font-size: 28px;
        color: var(--mo-text-medium);
		opacity: 0.7;
    }
    .mo-stat-label {
        font-size: 14px;
		font-weight: 500;
        color: var(--mo-text-medium);
		margin-bottom: 8px;
    }
    .mo-stat-value {
        font-family: var(--mo-font-heading);
        font-size: 32px;
        font-weight: 700;
        color: var(--mo-text-darkest);
		line-height: 1.2;
    }
    .mo-chart-container {
        position: relative;
        height: 350px;
        width: 100%;
    }
    .mo-stats-page-wrapper .form-table th, .mo-stats-page-wrapper .form-table td {
        padding: 20px;
    }

.mo-stats-cards-grid-expanded { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
    .mo-stat-subtext { font-size: 12px; color: #777; margin-top: 5px; }
    .mo-dashboard-grid {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 30px;
        margin-top: 30px;
    }
    .mo-top-list { list-style: none; margin: 15px 0 0; padding: 0; }
    .mo-top-list li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #f0f0f1; font-size: 13px; }
    .mo-top-list li:last-child { border-bottom: none; }
    .mo-top-list-hash { font-family: monospace; color: #555; }
    .mo-top-list-savings { font-weight: 600; color: #4CAF50; }
    .mo-top-list-empty { color: #999; }

    .mo-recommendations { margin-top: 15px; }
    .mo-recommendation-item { display: flex; align-items: center; gap: 15px; padding: 15px; border-radius: 8px; background-color: #f0f8ff; border: 1px solid #d1e7fd; margin-bottom: 15px; }
    .mo-recommendation-item .dashicons { font-size: 20px; color: #007cba; }
    .mo-recommendation-item p { margin: 0; font-size: 14px; }
    .mo-recommendation-warning { background-color: #fff9c4; border-color: #ffecb3; }
    .mo-recommendation-warning .dashicons { color: #f57f17; }

    .mo-tools-table { width: 100%; border: none; }
    .mo-tools-table th, .mo-tools-table td { padding: 20px; border-bottom: 1px solid #f0f0f1; }
    .mo-tools-table tr:last-child th, .mo-tools-table tr:last-child td { border-bottom: none; }
    .mo-tools-table th { width: 40%; }
    .mo-tools-table th p.description { font-weight: 400; font-size: 13px; }

    @media (max-width: 960px) {
        .mo-dashboard-grid { grid-template-columns: 1fr; }
    }
.mo-top-list li { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #f0f0f1; }
    .mo-top-list-details { display: flex; flex-direction: column; }
    .mo-top-list-filename { font-weight: 500; text-decoration: none; margin-bottom: 4px; }
    .mo-top-list-sizes { font-size: 12px; color: #777; font-family: monospace; }
    .mo-top-list-savings { font-weight: 600; color: #4CAF50; font-size: 14px; flex-shrink: 0; margin-left: 15px; }

    .mo-recommendation-success { background-color: #e8f5e9; border-color: #c8e6c9; }
    .mo-recommendation-success .dashicons { color: #4CAF50; }
    .mo-recommendation-info { background-color: #f0f8ff; border-color: #d1e7fd; }
    .mo-recommendation-info .dashicons { color: #007cba; }
	
	
/* === Statistics Page Dashboard Layout === */
.mo-stats-page-wrapper .card {
    max-width: none; 
    width: 100%;     
    margin: 0;       
    box-sizing: border-box;
}

.mo-stats-cards-grid-expanded { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.mo-stat-subtext { font-size: 12px; color: #777; margin-top: 5px; }

.mo-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 30px;
    margin-top: 30px;
    align-items: start;
    width: 100%;
}

.mo-main-content, 
.mo-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.mo-top-list { list-style: none; margin: 15px 0 0; padding: 0; }
.mo-top-list li { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #f0f0f1; }
.mo-top-list li:last-child { border-bottom: none; }
.mo-top-list-details { display: flex; flex-direction: column; }
.mo-top-list-filename { font-weight: 500; text-decoration: none; color: var(--mo-text-darkest); margin-bottom: 4px; }
.mo-top-list-sizes { font-size: 12px; color: var(--mo-text-medium); }
.mo-top-list-empty { color: #999; }

.mo-recommendations { margin-top: 15px; }
.mo-recommendation-item { display: flex; align-items: center; gap: 15px; padding: 15px; border-radius: 8px; margin-bottom: 15px; }
.mo-recommendation-item .dashicons { font-size: 20px; }
.mo-recommendation-item p { margin: 0; font-size: 14px; }
.mo-recommendation-success { background-color: #e8f5e9; border: 1px solid #c8e6c9; }
.mo-recommendation-success .dashicons { color: #4CAF50; }
.mo-recommendation-info { background-color: #f0f8ff; border-color: #d1e7fd; }
.mo-recommendation-info .dashicons { color: #007cba; }
.mo-recommendation-warning { background-color: #fff9c4; border-color: #ffecb3; }
.mo-recommendation-warning .dashicons { color: #f57f17; }

/* === Modernized Tools & Actions Table === */
.mo-tools-table {
    width: 100%;
    border-collapse: collapse;
    border: none;
    display: table;
}
.mo-tools-table tr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--mo-bg-border);
}
.mo-tools-table tr:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.mo-tools-table th, 
.mo-tools-table td {
    padding: 0;
    border: none;
    text-align: left;
}
.mo-tools-table th {
    flex-grow: 1;
}
.mo-tools-table td {
    flex-shrink: 0;
    margin-left: 20px;
}
.mo-tools-table th p.description {
    font-weight: 400;
    font-size: 13px;
    margin-top: 5px;
}

.mo-tools-form {
    border-bottom: 1px solid var(--mo-bg-border);
    margin-bottom: 20px;
    padding-bottom: 20px;
}
.mo-tools-form .submit { margin: 0; padding: 0; }
.mo-tools-table .button-primary { margin: 0; }

@media (max-width: 960px) {
    .mo-dashboard-grid { grid-template-columns: 1fr; }
    .mo-tools-table tr { flex-direction: column; align-items: flex-start; }
    .mo-tools-table td { margin-left: 0; margin-top: 15px; width: 100%; }
    .mo-tools-table td .button, .mo-tools-table td .mo-toggle-switch { width: 100%; text-align: center; }
}

/* === Section Title === */
.mo-section-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--mo-text-medium);
    margin: 20px 0 15px 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === Savings Breakdown Cards === */
.mo-breakdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.mo-breakdown-card {
    background: var(--mo-white);
    border: 1px solid var(--mo-bg-border);
    border-radius: var(--mo-radius);
    padding: 25px;
    box-shadow: var(--mo-shadow-soft);
    position: relative;
    overflow: hidden;
}

.mo-breakdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.mo-breakdown-format-label {
    font-size: 18px;
    font-weight: 600;
}
.mo-format-webp { color: #4caf50; }
.mo-format-avif { color: #9c27b0; }

.mo-breakdown-tag {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 20px;
    background-color: #e8e8ed;
    color: #86868b;
}
.mo-breakdown-tag.is-pro {
    background-color: #e0d4f8;
    color: #6b21a8;
}

.mo-breakdown-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--mo-text-darkest);
    line-height: 1.2;
}

.mo-breakdown-subtext {
    font-size: 14px;
    color: var(--mo-text-medium);
}

/* PRO Feature Lock Styles */
.mo-breakdown-card.is-pro-feature {
    filter: grayscale(80%);
    background-color: var(--mo-bg-light);
}

.mo-breakdown-card.is-pro-feature .mo-pro-cta {
    filter: grayscale(0);
    text-align: center;
    opacity: 1;
}

.mo-breakdown-card.is-pro-feature p {
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 15px;
    color: var(--mo-text-dark);
}

@media (max-width: 782px) {
    .mo-breakdown-grid {
        grid-template-columns: 1fr;
    }
}

.mo-card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--mo-bg-border);
    padding-bottom: 10px;
    margin-bottom: 10px;
}
.mo-card-header-flex h3 {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

/* === Dashboard (General Tab) Styles === */
.mo-dashboard-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 2.5fr) minmax(0, 1.5fr);
    gap: 30px;
}
.mo-dashboard-main { display: flex; flex-direction: column; gap: 30px; }

.mo-overview-card .mo-overview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--mo-bg-border);
}
.mo-overview-card h3 { border: none; padding: 0; margin: 0; }
.mo-overview-period { font-size: 13px; color: var(--mo-text-medium); }

.mo-overview-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    text-align: center;
    padding-top: 20px;
}
.mo-overview-stat-item .mo-stat-label {
    font-size: 14px;
    color: var(--mo-text-medium);
    margin-bottom: 8px;
    display: block;
}
.mo-overview-stat-item .mo-stat-value {
    font-size: 28px;
    font-weight: 600;
    color: var(--mo-text-darkest);
}

.mo-quick-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}
.mo-action-item {
    padding: 25px;
    border: 1px solid var(--mo-bg-border);
    border-radius: 12px;
    text-align: center;
}
.mo-action-item--highlight {
    border-color: var(--mo-primary);
    background-color: #f0f8ff;
}
 .mo-action-item--success {
    border-color: #4caf50;
    background-color: #e8f5e9;
}
.mo-action-item .dashicons {
    font-size: 32px;
    color: var(--mo-primary);
    margin-bottom: 15px;
}
.mo-action-item--success .dashicons { color: #4caf50; }
.mo-action-item h4 { font-size: 16px; margin: 0 0 10px; }
.mo-action-item p { font-size: 13px; color: var(--mo-text-medium); margin: 0 0 20px; }

.mo-pro-features-list { list-style: none; margin: 15px 0; padding: 0; }
.mo-pro-features-list li { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 8px; }
.mo-pro-features-list .dashicons { color: #4caf50; font-size: 18px; }

.mo-welcome-card {
    text-align: center;
    padding: 50px 30px;
}

.mo-welcome-icon {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: var(--mo-primary);
    margin-bottom: 20px;
}

.mo-welcome-card h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--mo-text-darkest);
    margin: 0 0 15px;
    border: none;
    padding: 0;
}

.mo-welcome-card .description {
    max-width: 500px;
    margin: 0 auto;
    font-size: 16px;
    color: #50575e;
    line-height: 1.6;
}

.mo-welcome-card .button-hero {
    margin-top: 20px;
}

@media (max-width: 1200px) {
    .mo-dashboard-wrapper { grid-template-columns: 1fr; }
}
@media (max-width: 782px) {
    .mo-overview-stats, .mo-quick-actions-grid { grid-template-columns: 1fr; }
}

/* === Inline Warning Message Style === */
.mo-inline-warning {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background-color: #fff8e1;
    border: 1px solid #ffecb3;
    border-left: 4px solid #fdd835;
    padding: 12px 15px;
    border-radius: 4px;
    margin-top: 15px;
}

.mo-inline-warning .dashicons {
    color: #f57f17;
    font-size: 20px;
    padding-top: 2px;
}

.mo-inline-warning p {
    margin: 0;
    padding: 0;
    font-size: 13px;
    color: #4e4a41;
}

.mo-inline-warning p strong {
    color: #212121;
}

/* === Premium Format Selector Styles === */
.mo-format-selector {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mo-format-selector.is-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: stretch;
}

.mo-format-option {
    background-color: var(--mo-white);
    border: 1px solid var(--mo-bg-border);
    border-radius: var(--mo-radius);
    transition: all 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
}

.mo-format-option:not(.is-disabled):hover {
    border-color: var(--mo-primary);
    box-shadow: 0 0 0 3px rgba(38, 109, 240, 0.1);
}

.mo-format-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    flex-grow: 1;
}

.mo-format-info {
    display: flex;
    flex-direction: column;
}

.mo-format-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--mo-text-darkest);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.mo-tag {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    line-height: 1;
}

.mo-tag--free {
    background-color: #e0f2f1;
    color: #00796b;
}

.mo-tag--pro {
    background-color: #e1d4f8;
    color: #6b21a8;
}

.mo-format-description {
    font-size: 13px;
    color: var(--mo-text-medium);
}

/* Toggle Switch Styles */
.mo-format-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    margin-left: 20px;
}
.mo-format-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.mo-format-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #dcdcde;
    transition: .3s;
    border-radius: 24px;
}
.mo-format-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.mo-format-toggle input:checked + .mo-format-slider {
    background-color: var(--mo-primary);
}
.mo-format-toggle input:checked + .mo-format-slider:before {
    transform: translateX(20px);
}

/* Disabled State */
.mo-format-option.is-disabled {
    background-color: var(--mo-bg-light);
    opacity: 0.7;
}
.mo-format-option.is-disabled .mo-format-label {
    cursor: not-allowed;
}
.mo-pro-required-notice {
    font-size: 12px;
    color: var(--mo-text-medium);
    padding: 0 20px 15px;
    margin: 0;
    border-top: 1px solid var(--mo-bg-border);
    padding-top: 15px;
	margin-top: auto;
}

@media (max-width: 782px) {
    .mo-format-selector.is-grid {
        grid-template-columns: 1fr;
    }
}

/* === "All Optimized" Placeholder Style === */
.mo-tree-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 50px 30px; /* Increased padding for breathing room */
    min-height: 200px;  /* Taller container */
    border: 2px dashed var(--mo-bg-border);
    border-radius: var(--mo-radius);
    background-color: #fafafa; /* Subtle background contrast */
}

.mo-tree-placeholder .dashicons {
    font-size: 52px; /* Larger icon */
    width: 52px;
    height: 52px;
    color: #c9c9cd;
    margin-bottom: 20px;
}

.mo-tree-placeholder h4 {
    font-size: 18px; /* Larger heading */
    font-weight: 600;
    color: var(--mo-text-darkest);
    margin: 0 0 10px;
}

.mo-tree-placeholder p {
    font-size: 14px;
    color: var(--mo-text-medium);
    /* Center the block, add bottom space for the button */
    margin: 0 auto 25px auto; 
    /* Relax the width so text flows better on two lines */
    max-width: 480px; 
    line-height: 1.6;
}

/* === Settings layout shared styles === */
.mo-settings-grid {
    display: grid;
    gap: 30px;
}

.mo-settings-grid--two-column {
    grid-template-columns: 2fr 1fr;
}

.mo-settings-grid--single-column {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.mo-main-content,
.mo-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.mo-settings-card,
.mo-sidebar-widget {
    background: var(--mo-white);
    border: 1px solid var(--mo-bg-border);
    border-radius: var(--mo-radius);
    padding: 30px;
    box-shadow: var(--mo-shadow-soft);
}

.mo-settings-card h3,
.mo-sidebar-widget h3 {
    font-family: var(--mo-font-heading);
    font-size: 18px;
    font-weight: 600;
    color: var(--mo-text-darkest);
    margin: 0 0 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--mo-bg-border);
}

.mo-settings-card p.description {
    margin-bottom: 20px;
}

.mo-inner-table {
    width: 100%;
    border-collapse: collapse;
}

.mo-inner-table td {
    padding: 15px 0;
    border-bottom: 1px solid var(--mo-bg-light);
    vertical-align: middle;
}

.mo-inner-table tr:last-child td {
    border-bottom: none;
}

.mo-inner-table td:last-child {
    text-align: right;
}

.mo-inner-table small {
    color: var(--mo-text-medium);
    font-size: 12px;
}

.mo-cta-card {
    background-color: var(--mo-bg-light);
    text-align: center;
}

.mo-cta-card .button {
    margin-top: 15px;
}

.mo-pro-promo {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--mo-bg-border);
}

.mo-pro-promo .button {
    width: 100%;
    text-align: center;
}

.mo-pro-promo p {
    font-size: 13px;
}

.mo-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.mo-checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* === Bulk page specifics === */
.step-number {
    background-color: var(--mo-primary);
    color: #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.mo-error-log {
    margin-top: 15px;
    padding: 10px;
    border: 1px solid #d63638;
    color: #d63638;
    max-height: 200px;
    overflow-y: auto;
    border-radius: 8px;
}

#mo-start-bulk-btn {
    margin-top: 25px;
    width: 100%;
    justify-content: center;
    height: 46px;
    font-size: 15px;
    transition: all 0.2s ease;
}

/* === NEW: Bulk Action UI Refinement === */
.mo-bulk-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    padding: 15px 20px;
    background: #ffffff;
    border: 1px solid var(--mo-bg-border);
    border-radius: 8px;
    transition: border-color 0.2s ease;
}

.mo-bulk-actions:hover {
    border-color: #b5b5b5;
}

.mo-bulk-actions label {
    font-weight: 500;
    color: var(--mo-text-dark);
    cursor: pointer;
}

/* === NEW: Unified Status Message Styles === */
#mo-remote-status-info,
.mo-bulk-progress-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    
    background-color: #ffffff;
    border: 1px solid var(--mo-bg-border);
    border-left: 4px solid var(--mo-primary);
    border-radius: 6px;
    
    margin-top: 15px;
    padding: 18px 25px;
    
    color: var(--mo-text-dark);
    font-size: 14px;
    font-weight: 500;
    
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    animation: moFadeInUp 0.3s ease-out;
    transition: all 0.3s ease;
}

#mo-remote-status-info strong,
.mo-bulk-progress-text strong {
    color: var(--mo-primary);
    font-weight: 700;
    background: #f0f7ff;
    padding: 2px 6px;
    border-radius: 4px;
}

#mo-remote-status-info .spinner,
.mo-bulk-progress-text .spinner {
    margin: 0; 
    float: none;
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.mo-bulk-progress-text {
    border-left-color: #9c27b0; /* Purple accent for active processing */
}

/* === NEW: Async Info Box Refinement === */
.mo-async-info {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background-color: #f0f7ff;
    border: 1px solid #cce5ff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    animation: moFadeInUp 0.4s ease-out;
}

.mo-async-info .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: var(--mo-primary);
    margin-top: 2px;
    flex-shrink: 0;
}

.mo-async-info h4 {
    margin: 0 0 6px 0;
    font-size: 15px;
    font-weight: 600;
    color: #1d2327;
}

.mo-async-info p {
    margin: 0;
    font-size: 13px;
    color: #50575e;
    line-height: 1.5;
}

@keyframes moFadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.mo-tree-content {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 13px;
}

.mo-tree-list {
    list-style: none;
    padding-left: 20px;
    margin: 0;
}

.mo-tree-item {
    position: relative;
    padding: 4px 0;
}

.mo-tree-item.is-folder > .mo-tree-label {
    cursor: pointer;
    font-weight: 500;
}

.mo-tree-label {
    display: flex;
    align-items: center;
}

.mo-tree-label .dashicons {
    margin-right: 8px;
    color: #787c82;
    transition: transform 0.2s ease-in-out;
}

.mo-tree-item.is-folder.is-open > .mo-tree-label .dashicons-arrow {
    transform: rotate(90deg);
}

.mo-tree-item.is-file .dashicons-arrow {
    visibility: hidden;
}

.mo-tree-item.is-folder > .mo-tree-list {
    display: none;
}

.mo-tree-item.is-folder.is-open > .mo-tree-list {
    display: block;
}

/* === Tools tab === */
.mo-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 40px 0 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--mo-bg-border);
}

.mo-section-header:first-child {
    margin-top: 0;
}

.mo-section-header h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--mo-text-darkest);
    margin: 0;
}

.mo-section-link {
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: var(--mo-primary);
}

.mo-section-link .dashicons {
    font-size: 16px;
    vertical-align: text-bottom;
}

.mo-card-grid-three {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.mo-info-card {
    background-color: var(--mo-white);
    padding: 30px;
    border: 1px solid var(--mo-bg-border);
    border-radius: var(--mo-radius);
    display: flex;
    flex-direction: column;
    box-shadow: var(--mo-shadow-soft);
}

.mo-info-card-icon {
    font-size: 28px;
    color: var(--mo-primary);
    margin-bottom: 15px;
}

.mo-info-card h3 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    padding: 0;
}

.mo-info-card p {
    font-size: 14px;
    color: var(--mo-text-medium);
    line-height: 1.6;
    margin: 0 0 20px;
    flex-grow: 1;
}

.mo-card-link,
.mo-info-card ul li a {
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    color: var(--mo-primary);
}

.mo-info-card ul {
    margin: 0;
    padding: 0;
    list-style: none;
    flex-grow: 1;
}

.mo-info-card ul li {
    margin-bottom: 12px;
}

#mo-copy-debug-btn {
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#mo-debug-info-area {
    width: 100%;
    height: 500px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
    font-size: 12px;
    white-space: pre;
    background-color: #1e293b;
    color: #cbd5e1;
    border: 1px solid #334155;
    padding: 15px;
    border-radius: 8px;
    line-height: 1.6;
}

.mo-log-table-wrapper {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.mo-log-table-wrapper .wp-list-table {
    border: none;
}

.mo-log-table-wrapper .wp-list-table th {
    background-color: #f9fafb;
}

/* === Integrations tab === */
.mo-integrations-wrapper {
    max-width: 1200px;
    margin: 20px auto;
}

.mo-integrations-header {
    text-align: center;
    margin-bottom: 40px;
}

.mo-integrations-header h2 {
    font-size: 28px;
    font-weight: 600;
    color: #1d1d1f;
}

.mo-integrations-header .description {
    font-size: 16px;
    color: #86868b;
    max-width: 600px;
    margin: 10px auto 0;
}

.mo-integrations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.mo-integration-card {
    background-color: #fff;
    border: 1px solid #e8e8ed;
    border-radius: 16px;
    padding: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    position: relative;
}

.mo-integration-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.mo-integration-card.is-inactive {
    opacity: 0.65;
    background-color: #fafafa;
}

.mo-integration-card.is-inactive:hover {
    opacity: 1;
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.mo-integration-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.mo-integration-logo .dashicons {
    font-size: 36px;
    color: #86868b;
}

.mo-status-tag {
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
}

.mo-status-active {
    background-color: #d1fae5;
    color: #065f46;
}

.mo-status-inactive {
    background-color: #f3f4f6;
    color: #4b5563;
}

.mo-integration-card-body h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
}

.mo-integration-card-body p {
    font-size: 14px;
    color: #424245;
    line-height: 1.6;
    margin: 0;
}

.mo-pro-tag {
    display: inline-block;
    background: linear-gradient(45deg, #8d00b1, #6b21a8);
    color: #fff;
    padding: 3px 9px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(139, 0, 177, 0.3);
}

.mo-integration-card.has-premium-border {
    position: relative;
    overflow: hidden;
    background-color: #ffffffd9;
    border: none;
}

.mo-integration-card.has-premium-border::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(#3471ff, #00c2ff, #a767e5, #4fcf70, #fad648, #3471ff);
    animation: mo-premium-glow-rotate 4s linear infinite;
}

.mo-integration-card.has-premium-border::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 1px;
    border-radius: 15px;
    background: inherit;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

@keyframes mo-premium-glow-rotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* === Attachment meta box === */
.mo-metabox-container {
    font-size: 13px;
    line-height: 1.6;
}

.mo-metabox-summary {
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.mo-metabox-summary strong {
    font-size: 14px;
    color: #007cba;
}

.mo-metabox-details h4 {
    font-size: 13px;
    margin: 15px 0 5px;
    font-weight: 600;
    padding-top: 5px;
    border-top: 1px solid #eee;
}

.mo-metabox-details p {
    margin: 0 0 10px;
}

.mo-metabox-details p:first-of-type {
    border-top: none;
    padding-top: 0;
}

.mo-metabox-details strong {
    color: #1d2327;
}

.mo-metabox-footer {
    padding-top: 10px;
    margin-top: 10px;
    border-top: 1px solid #ddd;
    color: #50575e;
}

/* === Premium Feature Card Styles === */
.mo-feature-card {
    background: var(--mo-white);
    border: 1px solid var(--mo-bg-border);
    border-radius: var(--mo-radius);
}
.mo-feature-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
}
.mo-feature-card__title {
    display: flex;
    align-items: center;
    gap: 10px;
}
.mo-feature-card__title strong {
    font-size: 16px;
    font-weight: 600;
    color: var(--mo-text-darkest);
}
.mo-feature-card__body {
    padding: 0 25px 25px;
    border-top: 1px solid var(--mo-bg-border);
    font-size: 14px;
    color: var(--mo-text-dark);
    line-height: 1.6;
}
.mo-feature-card__body ul {
    list-style: none;
    margin: 15px 0;
    padding: 0;
}
.mo-feature-card__body ul li {
    margin-bottom: 10px;
}
.mo-feature-card__body strong {
    color: var(--mo-text-darkest);
    font-weight: 600;
}
.mo-feature-card.is-locked {
    background-color: var(--mo-bg-light);
    opacity: 0.8;
}
.mo-feature-card .mo-pro-required-notice {
    margin-top: 20px;
    padding: 15px;
    background-color: #fff9e6;
    border: 1px solid #ffecb3;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}
.mo-feature-card .mo-pro-required-notice .dashicons {
    color: #f57f17;
}

/* === Professional Notice Card Styles (New, Cohesive Design) === */
.mo-notice-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: var(--mo-radius);
    border: 1px solid transparent;
    box-shadow: var(--mo-shadow-soft);
}

/* Styling for the error/required action notice */
.mo-notice-card.mo-notice-danger {
    background-color: #fff2f2;
    border-color: #fecaca;
    border-left: 5px solid var(--mo-danger, #dc3545);
}

.mo-notice-icon-wrapper .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: var(--mo-danger, #dc3545);
    margin-top: 2px;
}

.mo-notice-content {
    flex: 1;
}

.mo-notice-content h3 {
    margin: 0 0 10px;
    padding: 0;
    border: none;
    font-size: 18px;
    font-weight: 600;
    color: var(--mo-text-darkest);
}

.mo-notice-content > p {
    font-size: 14px;
    color: var(--mo-text-dark);
    margin: 0;
    line-height: 1.6;
}

.mo-notice-code-box {
    margin-top: 20px;
    background-color: var(--mo-white);
    border: 1px solid var(--mo-bg-border);
    border-radius: var(--mo-radius);
    overflow: hidden;
}

.mo-code-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background-color: var(--mo-bg-light);
    border-bottom: 1px solid var(--mo-bg-border);
    font-size: 14px;
    font-weight: 500;
    color: var(--mo-text-dark);
}

.mo-copy-button-alt {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 12px !important;
    padding: 4px 12px !important;
    height: auto !important;
    line-height: 1.5 !important;
}
.mo-copy-button-alt .dashicons {
    font-size: 14px;
}

.mo-code-box-content {
    padding: 20px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--mo-text-dark);
}

.mo-code-box-content p {
    margin-bottom: 1.5em;
}
.mo-code-box-content p:last-child {
    margin-bottom: 0;
}

.mo-code-textarea {
    width: 100%;
    min-height: 200px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    font-size: 13px;
    background-color: var(--mo-bg-light);
    color: var(--mo-text-darkest);
    padding: 15px;
    border-radius: 8px;
    white-space: pre;
    word-wrap: normal;
    overflow-x: auto;
    margin: 15px 0;
    border: 1px solid var(--mo-bg-border);
    resize: vertical;
}

.mo-tools-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--mo-bg-border);
}

.mo-tools-table td .button {
    min-width: 200px;
    text-align: center;
}

/* === Icon alignment for the 'Optimization Complete' button === */
#mo-start-bulk-btn .dashicons {
    vertical-align: text-bottom;
    margin-right: 8px;
    font-size: 18px;
}

/* === Bulk Page - Scanner UI === */
.mo-card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--mo-bg-border);
    padding-bottom: 15px;
    margin-bottom: 15px;
}
.mo-card-header-flex h3 {
    margin: 0;
    padding: 0;
    border: none;
}
.mo-scanner-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}
.mo-scan-status {
    font-size: 13px;
    color: var(--mo-text-medium);
}
#mo-start-scan-btn .dashicons {
    vertical-align: text-top;
    margin-right: 4px;
}
#mo-start-scan-btn:disabled {
    cursor: not-allowed;
}

/* Progress Bar & Placeholders */
#mo-scanner-ui {
    margin-bottom: 20px;
}
.mo-scan-progress-bar {
    width: 100%;
}
.mo-progress-bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--mo-text-dark);
}
.mo-progress-bar-track {
    width: 100%;
    height: 8px;
    background-color: var(--mo-bg-border);
    border-radius: 4px;
    overflow: hidden;
}
.mo-progress-bar-fill {
    width: 0%;
    height: 100%;
    background-color: var(--mo-primary);
    border-radius: 4px;
    transition: width 0.3s ease-in-out;
}

/* === NEW: API WIDGET STYLES === */
.mo-api-widget {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.mo-api-input-group {
    display: flex;
    gap: 10px;
}
.mo-api-input-group input[type="text"] {
    flex-grow: 1;
    margin: 0;
}
#mo-api-status p {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 500;
}
#mo-api-status p:last-child {
    margin-bottom: 0;
}
#mo-api-status p.success {
    color: #4caf50;
}
#mo-api-status p.error {
    color: var(--mo-danger);
}
.mo-api-status-box {
    background-color: #f0f8ff;
    border: 1px solid #d1e7fd;
    border-radius: var(--mo-radius);
    padding: 15px 20px;
}
.mo-api-status-box p {
    margin: 0 0 10px;
}
.mo-api-status-box p:last-child {
    margin-bottom: 0;
}
.mo-api-status-box strong {
    color: var(--mo-text-darkest);
}

.mo-sidebar-widget .mo-pro-promo h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--mo-text-darkest);
}

.mo-sidebar-widget .mo-pro-promo p {
    margin-bottom: 15px;
}

/* =========================================
   RESPONSIVE & VISUAL IMPROVEMENTS
   ========================================= */

/* 1. Layout Grid - Switch to single column sooner
   Prevents the sidebar from squishing the content on tablets/small laptops. */
@media (max-width: 1180px) {
    .mo-settings-grid--two-column {
        grid-template-columns: 1fr; /* Stack them vertically */
        gap: 25px;
    }
    
    /* When stacked, make the sidebar grid 2-columns to save vertical space */
    .mo-sidebar {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 25px;
    }
}

/* 2. Card Headers (The "1 File Scanner" area)
   Fixes the issue where the Step Number was misaligned or wrapping awkwardly. */
.mo-card-header-flex {
    display: flex;
    flex-wrap: wrap; /* Allow items to wrap on small screens */
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid var(--mo-bg-border);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.mo-card-header-flex h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    white-space: nowrap; /* Keeps "1 File Scanner" on one line if possible */
    font-size: 18px;
}

.step-number {
    flex-shrink: 0; /* Prevents the circle from getting squashed */
    width: 28px;    /* Slightly larger for better visibility */
    height: 28px;
    font-size: 15px;
}

/* 3. Scanner Controls (The "Rescan" button area)
   Fixes the "Last scan complete" text looking cramped. */
.mo-scanner-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.mo-scan-status {
    text-align: right;
    font-size: 12px;
    color: var(--mo-text-medium);
    max-width: 200px; /* Prevents text from stretching too wide */
    line-height: 1.3;
}

/* 4. API Key Widget (Sidebar)
   Fixes the input field and disconnect button alignment. */
.mo-api-input-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap; /* Essential for mobile */
}

.mo-api-input-group input[type="text"] {
    flex: 1 1 200px; /* Grow to fill space, but allow shrinking */
    min-width: 0;    /* Fixes CSS Grid/Flex overflow issues */
    height: 42px;    /* Taller touch target */
    font-family: monospace;
}

.mo-api-widget .mo-disconnect-btn {
    align-self: center;
    white-space: nowrap;
    padding: 5px 10px !important;
}

/* 5. Progress Circles (Centering) */
.mo-progress-circles {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    padding: 30px 0;
}

/* 6. Mobile-Specific Adjustments (< 600px) */
@media (max-width: 600px) {
    /* Make the header stack vertically */
    .mo-card-header-flex {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .mo-scanner-controls {
        width: 100%;
        justify-content: space-between;
        margin-top: 5px;
    }
    
    .mo-scan-status {
        text-align: left;
    }

    /* Buttons full width on mobile for easier tapping */
    #mo-start-scan-btn,
    #mo-refresh-tree-btn,
    #mo-start-bulk-btn {
        width: 100%;
        justify-content: center;
        height: 44px;
    }

    /* Adjust API input layout */
    .mo-api-input-group {
        flex-direction: column;
    }
    
    .mo-api-widget .mo-disconnect-btn {
        align-self: flex-start;
        margin-left: 0 !important;
        margin-top: 5px;
    }
    
    .mo-sidebar {
        grid-template-columns: 1fr; /* Force single column sidebar on mobile */
    }
}