/**
 * EU AI Act Ready Admin Styles
 */

@use '../variables' as *;
@use '../mixins' as *;

/* ========================================
   1. BASE STYLES & LAYOUT
   ======================================== */

.euaiactready-icon {
    display: inline-block;
    vertical-align: top;
}

.ai-transparency-modal-trigger-preview {
    .euaiactready-icon {
        vertical-align: middle;
    }
}

.euaiactready-dashboard {
    padding: $spacing-xl;
}

.euaiactready-settings {
    padding: $spacing-xl;
}

.euaiactready-about {
    @include card;

    h3 {
        margin-top: 25px;
        margin-bottom: $spacing-lg;
    }

    ul {
        list-style: disc;
        padding-left: $spacing-3xl;

        li {
            margin-bottom: $spacing-sm;
        }
    }
}

/* ========================================
   2. DASHBOARD & STATISTICS
   ======================================== */

/* Legacy header support */
.euaiactready-header {
    @include card;
    margin: $spacing-xl 0;

    p {
        font-size: $font-size-2xl;
        margin-bottom: $spacing-lg;
    }
}

/* Statistics Cards */
.euaiactready-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax($stat-card-min-width, 1fr));
    gap: $gap-2xl;
    margin: $spacing-xl 0;
}

.stat-card {
    @include card;
    @include card-hover;
    @include flex-align(center);
    padding: 25px;
    gap: $gap-2xl;

    &.stat-updated {
        animation: statPulse 0.5s $transition-ease-in-out;
        border: 2px solid $color-info;
    }

    a {
        display: flex;
        align-items: center;
        gap: $gap-2xl;
        width: 100%;
        text-decoration: none;
        color: inherit;
    }
}

.stat-icon {
    font-size: $stat-icon-size;
    line-height: $line-height-single;
}

.stat-content {
    h3 {
        margin: 0;
        font-size: $font-size-6xl;
        font-weight: $font-weight-semibold;
        color: $color-wp-gray-dark;
    }

    p {
        margin: 5px 0 0;
        color: $color-wp-gray;
        font-size: $font-size-xl;
    }
}

/* Feature Activation Status */
.euaiactready-transparency-status {
    background: $color-white;
    padding: 25px;
    border-radius: $radius-lg;
    box-shadow: $shadow-sm;
    margin-top: 30px;

    .section-header {
        margin-top: 0;
        margin-bottom: $gap-2xl;
        padding-bottom: 15px;
        border-bottom: 2px solid #f0f0f0;
        @include flex-align(center);
        gap: $gap-md;

        .dashicons {
            font-size: 24px;
            width: 24px;
            height: 24px;
        }
    }

    .euaiactready-stats {
        margin-top: 0;
    }

    .stat-card {
        padding: 0;
        transition: $transition-all;

        &.activated {
            border: 2px solid #10b981;
        }

        &.deactivated {
            border: 2px solid #e5e7eb;
        }

        a {
            display: flex;
            align-items: center;
            gap: $gap-2xl;
            padding: 25px;
            width: 100%;
            text-decoration: none;
            color: inherit;
        }

        .stat-icon {
            .dashicons {
                font-size: 32px;
            }

            &.activated {
                color: #10b981;
            }

            &.deactivated {
                color: #6b7280;
            }
        }

        .stat-content {
            h3 {
                margin: 0 0 5px 0;
                font-size: 18px;

                &.activated {
                    color: #10b981;
                }

                &.deactivated {
                    color: #6b7280;
                }
            }

            p {
                margin: 0;
                color: #4b5563;
                font-size: 13px;
            }
        }
    }
}

/* Explanation & Tips Section */
.euaiactready-explanation {
    background: $color-white;
    padding: 25px;
    border-radius: $radius-lg;
    box-shadow: $shadow-sm;
    margin-top: 25px;

    h3 {
        margin-top: 0;
    }

    ol {
        margin-left: $gap-2xl;
        margin-bottom: 25px;
    }

    .tips-box {
        background: #f0f7ff;
        padding: 15px;
        border-left: 4px solid #0073aa;
        border-radius: 0 $radius-sm $radius-sm 0;

        h4 {
            margin-top: 0;
        }

        ul {
            margin-left: $gap-2xl;
            margin-bottom: 0;
        }
    }
}

/* ========================================
   3. SCAN CTA & PROGRESS
   ======================================== */

/* Scan CTA Section - Compact Horizontal Layout */
.euaiactready-scan-cta {
    @include border-card($color-wp-border);
    padding: $spacing-2xl $spacing-3xl;
    margin: $spacing-xl 0;
    box-shadow: $shadow-sm;
    @include flex-align(center);
    gap: $gap-3xl;
}

.scan-cta-icon {
    width: $cta-icon-size;
    height: $cta-icon-size;
    min-width: $cta-icon-size;
    background: $gradient-admin;
    border-radius: $radius-2xl;
    @include flex-center;
    box-shadow: $shadow-cta;

    .dashicons {
        font-size: $font-size-icon-3xl;
        width: $font-size-icon-3xl;
        height: $font-size-icon-3xl;
        color: $color-white;
    }
}

.scan-cta-content {
    flex: 1;

    h2 {
        margin: 0 0 4px 0;
        font-size: $font-size-3xl;
        font-weight: $font-weight-semibold;
        color: $color-wp-gray-dark;
    }

    p {
        margin: 0;
        font-size: $font-size-lg;
        color: $color-wp-gray;
        line-height: $line-height-normal;
    }
}

.scan-cta-form {
    @include flex-column($gap-sm);
    align-items: flex-end;

    .button-hero {
        @include flex-align(center);
        gap: $gap-sm;
        padding: $spacing-lg $spacing-xl !important;
        font-size: $font-size-xl !important;
        border-radius: $radius-md;
        transition: $transition-all;

        .dashicons {
            font-size: $font-size-icon-xl;
            width: $font-size-icon-xl;
            height: $font-size-icon-xl;
            margin-top: 1px;
        }

        &:hover {
            transform: translateY(-1px);
            box-shadow: $shadow-admin-hover;
        }
    }
}

.scan-cta-hint {
    font-size: $font-size-base;
    color: $color-wp-gray-light;
    font-style: italic;
    text-align: right;
}

/* Scan Form & Buttons */
.button-hero {
    padding: $spacing-md 36px !important;
    height: auto !important;
    font-size: $font-size-2xl !important;
}

#scan-form {
    display: flex;
    gap: $spacing-lg;
    flex-wrap: wrap;
}

/* Scan Progress Message */
.scan-progress-message {
    margin: $spacing-xl 0;
    @include pulse-animation();
}

/* Progress wrapper - stays visible above scrolling content */
#scan-progress-wrapper,
.scan-progress-container {
    margin: 0;
    padding: 15px;
    background: $color-white;
    border-bottom: 1px solid #e0e0e0;
}

/* ========================================
   4. SCAN LOG & DETECTION RESULTS
   ======================================== */

/* Scan Log */
.euaiactready-scan-log {
    background: #fff;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #2196f3;
}

.euaiactready-scan-log.error-log {
    border-left-color: #d32f2f;
}

.euaiactready-scan-log.live-scan {
    border-left-color: #4caf50;
}

.euaiactready-scan-log h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #1d2327;
    font-size: 18px;
}

.scan-log-toggle {
    text-decoration: none;
    display: block;
    cursor: pointer;
}

.scan-log-toggle:hover h3 {
    color: #2271b1;
}

.scan-log-toggle .toggle-icon {
    display: inline-block;
    width: 20px;
    font-family: monospace;
    font-weight: bold;
    transition: transform 0.2s;
}

.scan-log-content {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 0 0 4px 4px;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    line-height: 1.8;
}

/* Scrollbar styling for scan log */
.scan-log-content::-webkit-scrollbar {
    width: 8px;
}

.scan-log-content::-webkit-scrollbar-track {
    background: #e8eaed;
    border-radius: 4px;
}

.scan-log-content::-webkit-scrollbar-thumb {
    background: #9aa0a6;
    border-radius: 4px;
}

.scan-log-content::-webkit-scrollbar-thumb:hover {
    background: #5f6368;
}

/* Live Indicator */
.live-indicator {
    display: inline-block;
    color: #4caf50;
    font-weight: bold;
    animation: blink 1s ease-in-out infinite;
    margin-left: 10px;
    font-size: 14px;
}

/* Log Entries */
.log-entry {
    padding: 4px 0;
    color: #2c3338;
    white-space: pre-wrap;
    word-break: break-word;
}

.log-entry:hover {
    background: #e8eaed;
    padding-left: 8px;
    margin-left: -8px;
    border-radius: 2px;
}

.log-entry-start,
.log-entry-complete {
    font-weight: bold;
    color: #1976d2;
}

.log-entry-error {
    color: #d32f2f;
    font-weight: bold;
    background: #ffebee;
    padding: 4px 8px;
    border-radius: 4px;
    margin: 4px 0;
}

.log-entry-success {
    color: #388e3c;
}

.log-entry-detection {
    font-weight: 600;
}

.log-entry-summary {
    font-weight: bold;
    color: #7b1fa2;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
}

.scan-log-notice {
    animation: slideIn 0.3s ease-out;
}

/* Detections Section */
.euaiactready-detections {
    background: transparent;
    padding: 0;
    margin: 40px 0;
    box-shadow: none;
    border-radius: 0;
}

.euaiactready-detections h2 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 23px;
    font-weight: 400;
    color: #1d2327;
}

.euaiactready-detections>p {
    color: #50575e !important;
    margin-bottom: 20px !important;
}

.euaiactready-detections .notice.notice-info {
    padding: 10px 12px;
}

/* Visual split between the two main sections */
.euaiactready-section-images {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #dcdcde;
}

/* ========================================
   5. TABLES (ACF-STYLE DESIGN)
   ======================================== */

/* Table wrapper - white card with rounded corners */
.euaiactready-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border: 1px solid #e1e1e1;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.euaiactready-table th,
.euaiactready-table td {
    padding: 12px 14px;
    text-align: left;
    border: none;
    border-bottom: 1px solid #f0f0f1;
    vertical-align: middle;
    font-size: 13px;
    color: #50575e;
}

/* Header row */
.euaiactready-table thead th {
    background: #f9f9f9;
    font-weight: 600;
    color: #1d2327;
    border-bottom: 1px solid #e1e1e1;
    position: relative;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    font-size: 13px;
}

.euaiactready-table thead th:hover {
    color: #2271b1;
}

/* Sortable column indicator */
.euaiactready-table thead th.sortable::after {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 6px;
    vertical-align: middle;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #c3c4c7;
    opacity: 0.5;
}

.euaiactready-table thead th.sortable.asc::after {
    border-top: none;
    border-bottom: 4px solid #2271b1;
    opacity: 1;
}

.euaiactready-table thead th.sortable.desc::after {
    border-top: 4px solid #2271b1;
    opacity: 1;
}

/* Checkbox column */
.euaiactready-table th.check-column,
.euaiactready-table td.check-column {
    width: 35px;
    padding: 12px 0 12px 10px;
}

.euaiactready-table th.check-column input[type="checkbox"],
.euaiactready-table td.check-column input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Row styling */
.euaiactready-table tbody tr {
    background: #f6f7f7;
    transition: background 0.1s ease;
}

.euaiactready-table tbody tr:hover {
    background: #F7FBFD;
}

.euaiactready-table tbody tr.selected {
    background: #f0f6fc;
}

.euaiactready-table tbody tr.selected:hover {
    background: #e8f0f8;
}

.euaiactready-table tbody tr:last-child td {
    border-bottom: none;
}

/* Title column */
.euaiactready-table .column-title a {
    color: #2271b1;
    text-decoration: none;
    font-weight: 600;
}

.euaiactready-table .column-title a:hover {
    color: #135e96;
    text-decoration: underline;
}

/* Type indicator */
.euaiactready-table .column-type {
    color: #50575e;
}

.euaiactready-table .type-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #50575e;
    font-size: 13px;
}

.euaiactready-table .type-indicator .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #646970;
}

/* Status column */
.euaiactready-table .column-status {
    color: #50575e;
}

/* No date indicator */
.euaiactready-table .no-date {
    color: #a7aaad;
}

/* Thumbnail cell */
.euaiactready-table .column-thumbnail {
    width: 50px;
    padding-right: 0;
}

.euaiactready-table .column-thumbnail img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 3px;
}

/* Actions column */
.euaiactready-table .column-actions {
    white-space: nowrap;
}

.euaiactready-table .row-actions {
    display: flex;
    align-items: center;
    gap: 0;
    visibility: hidden;
    margin-top: 4px;
}

.euaiactready-table tbody tr:hover .row-actions {
    visibility: visible;
}

.euaiactready-table .row-actions a,
.euaiactready-table .row-actions button {
    color: #2271b1;
    text-decoration: none;
    font-size: 13px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}

.euaiactready-table .row-actions a:hover,
.euaiactready-table .row-actions button:hover {
    color: #135e96;
    text-decoration: underline;
}

.euaiactready-table .row-actions .separator {
    color: #c3c4c7;
    margin: 0 5px;
}

.euaiactready-table .row-actions .action-danger {
    color: #d63638;

    &.mark-ai-image {
        color: #d63638;
    }
}

.euaiactready-table .row-actions .action-danger:hover {
    color: #8a2424;
}

/* AI Images Section */
.euaiactready-section-images {
    margin-top: $gap-2xl;
    border-top: none;
    padding-top: 0;
}

#euaiactready-unmarked-table {
    width: 100%;
}

/* Footer row */
.euaiactready-table tfoot {
    display: none;
}

/* Table footer info */
.euaiactready-table-footer {
    padding: 12px 14px;
    color: #646970;
    font-size: 13px;
    background: #f9f9f9;
    border: 1px solid #e1e1e1;
    border-top: none;
    border-radius: 0 0 8px 8px;
    margin-top: -1px;
}

/* Empty state */
.euaiactready-empty-state {
    padding: 40px 20px;
    text-align: center;
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    color: #646970;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.euaiactready-empty-state .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #c3c4c7;
    margin-bottom: 15px;
}

.euaiactready-empty-state p {
    margin: 0;
    font-size: 14px;

    &.hint {
        margin-top: 8px;
        font-size: 13px;
    }
}

/* ========================================
   6. DATATABLES INTEGRATION
   ======================================== */

.dataTables_wrapper {
    margin-top: 15px;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 15px;
}

.dataTables_wrapper .dataTables_length {
    float: left;
}

.dataTables_wrapper .dataTables_filter {
    float: right;
}

.dataTables_wrapper .dataTables_filter label {
    font-weight: 600;
    color: #1d2327;
}

.dataTables_wrapper .dataTables_filter input {
    margin-left: 8px;
    padding: 6px 12px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    min-width: 300px;
    background: #FFFFFF;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #2271b1;
    outline: 2px solid transparent;
    box-shadow: 0 0 0 1px #2271b1;
}

.dataTables_wrapper .dataTables_length label {
    font-weight: 600;
    color: #1d2327;
}

.dataTables_wrapper .dataTables_length select {
    margin: 0 8px;
    padding: 4px 24px 4px 10px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
}

.dataTables_wrapper .dataTables_info {
    padding-top: 12px;
    color: #646970;
    font-weight: 500;
}

div.dt-container select.dt-input {
    width: 50px;
}

.column-date,
table.dataTable td.dt-left,
table.dataTable th.dt-left {
    text-align: left !important;
}

.dataTables_wrapper .dataTables_paginate {
    padding-top: 12px;
    float: right;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 6px 12px;
    margin-left: 4px;
    background: #f6f7f7;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    color: #2c3338;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #f0f0f1;
    border-color: #8c8f94;
    color: #1d2327 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: #135e96;
    border-color: #135e96;
    color: #fff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    background: #f6f7f7;
    border-color: #c3c4c7;
    color: #2c3338 !important;
}

.dataTables_wrapper .dataTables_processing {
    background: #fff;
    border: 1px solid #c3c4c7;
    color: #1d2327;
}

/* DataTables row styling */
table.dataTable tbody tr {
    background-color: transparent;
}

table.dataTable tbody tr:hover {
    background-color: #f6f7f7;
}

table.dataTable.stripe tbody tr.odd,
table.dataTable.display tbody tr.odd {
    background-color: #f6f7f7;
}

table.dataTable.stripe tbody tr.odd:hover,
table.dataTable.display tbody tr.odd:hover {
    background-color: #f0f0f1;
}

table.dataTable.stripe tbody tr.even:hover,
table.dataTable.display tbody tr.even:hover {
    background-color: #f0f0f1;
}

/* DataTables sorting */
table.dataTable thead .sorting_asc_disabled,
table.dataTable thead .sorting_desc_disabled {
    background-image: none !important;
}

table.dataTable thead th.sorting_disabled {
    background-image: none !important;
    cursor: default !important;
    padding-right: 8px !important;
}

table.dataTable.no-footer {
    border-bottom: 1px solid #c3c4c7;
}

/* Clear floats */
.dataTables_wrapper::after {
    content: "";
    display: table;
    clear: both;
}

/* ========================================
   7. AI MEDIA DETECTION
   ======================================== */

/* Media Detection Container */
.ai-media-detection-container {
    margin: 10px 0;
}

.ai-media-detection-label {
    display: block;
    margin-bottom: 10px;
}

.ai-media-detection-label-popup {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    cursor: pointer;
}

.ai-media-detection-label-popup input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.ai-media-detection-label-popup strong {
    margin: 0;
}

.attachment-details .compat-attachment-fields tr .ai-media-detection-container label input {
    margin: 3px 3px 0;
}

.attachment-details .compat-attachment-fields tr .alignleft {
    padding-top: 12px;
}

/* Status Box */
.ai-media-status-box {
    margin: 10px 0;
    padding: 0px 12px;
    background: #f9fafb;
    border-radius: 4px;
}

.ai-media-status-box.status-high {
    border-left: 4px solid #10a37f;
}

.ai-media-status-box.status-medium {
    border-left: 4px solid #d97706;
}

.ai-media-status-box.status-low {
    border-left: 4px solid #6b7280;
}

.ai-media-status-box.status-info {
    border-left: 4px solid #9ca3af;
}

.ai-media-status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.ai-media-status-header strong {
    font-size: 13px;
}

/* Confidence Badge */
.ai-media-confidence-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: white;
}

.ai-media-confidence-badge.high {
    background: #10a37f;
}

.ai-media-confidence-badge.medium {
    background: #d97706;
}

.ai-media-confidence-badge.low {
    background: #6b7280;
}

/* Confidence Bar */
.ai-media-confidence-bar-container {
    background: #e5e7eb;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.ai-media-confidence-bar {
    height: 100%;
    transition: width 0.3s;
}

.ai-media-confidence-bar.high {
    background: #10a37f;
}

.ai-media-confidence-bar.medium {
    background: #d97706;
}

.ai-media-confidence-bar.low {
    background: #e5e7eb;
}

/* Detection Details & Notes */
.ai-media-detection-details {
    font-size: 11px;
    color: #6b7280;
}

.ai-media-detection-note {
    font-size: 11px;
    color: #666;
    margin-top: 10px;
}

/* Recheck Button */
.ai-media-recheck-button,
.ai-popup-recheck-button,
.ai_recheck_button {
    margin-top: 10px;
    width: 100%;
}

.ai-media-recheck-button .dashicons,
.ai-popup-recheck-button .dashicons,
.ai_recheck_button .dashicons {
    margin-top: 3px;
}

/* Recheck Messages */
#ai_recheck_message,
.ai-popup-recheck-message {
    margin-top: 10px;
    padding: 8px;
    border-radius: 3px;
    display: none;
}

#ai_recheck_message.success,
.ai-popup-recheck-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#ai_recheck_message.success svg,
.ai-popup-recheck-message.success svg {
    vertical-align: text-top;
    margin-right: 4px;
}

#ai_recheck_message.error,
.ai-popup-recheck-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#ai_recheck_message.error svg,
.ai-popup-recheck-message.error svg {
    vertical-align: text-top;
    margin-right: 4px;
}

/* Not Eligible Message */
.ai-media-not-eligible {
    margin: 10px 0;
}

.ai-media-not-eligible-content {
    padding: 0px 12px;
    background: #f9fafb;
    border-left: 4px solid #9ca3af;
    border-radius: 4px;
    font-size: 13px;
    color: #6b7280;
}

.ai-media-not-eligible-content span {
    font-size: 12px;
}

.ai-media-not-eligible-content span.small {
    font-size: 11px;
}

.ai-media-not-eligible-content code {
    background: #e5e7eb;
    padding: 2px 6px;
    border-radius: 3px;
}

/* SVG Icons */
.ai-media-icon {
    display: inline-block;
    vertical-align: text-top;
    margin-right: 4px;
}

/* Media Library Column Badges */
.ai-media-column-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

.ai-media-column-badge.confirmed {
    background: #10a37f;
    color: white;
}

.ai-media-column-badge.detected {
    background: #d97706;
    color: white;
}

.ai-media-column-badge.low {
    color: #999;
    font-size: 11px;
}

.ai-media-column-badge.none {
    color: #999;
}

/* ========================================
   8. META BOXES & FORMS
   ======================================== */

/* AI Disclosure Meta Box */
.euaiactready-meta-box {
    padding: 10px 0;
}

.euaiactready-meta-box p {
    margin: 8px 0;
}

.euaiactready-meta-box label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

.euaiactready-meta-box input[type="checkbox"] {
    margin: 0;
}

.euaiactready-meta-box .description {
    margin-top: 12px;
    font-style: italic;
    color: #666;
}

/* ========================================
   9. SETTINGS PAGE & PREVIEWS
   ======================================== */

/* How It Works Section */
.how-it-works-section {
    background: $color-white;
    border: 1px solid #ccd0d4;
    padding: $gap-2xl;
    border-radius: $radius-sm;
    margin-bottom: 25px;

    h4 {
        margin-top: 0;
    }

    ol {
        margin-left: $gap-2xl;
        margin-bottom: 15px;
    }

    .warning-box {
        background: #fff8e5;
        border-left: 4px solid #ffb900;
        padding: $gap-md 15px;
        margin-top: 15px;

        p {
            margin: 0;
            font-size: 13px;
        }
    }
}

/* Notice Preview Container */
.notice-preview-container {
    background: #f9f9f9;
    padding: 25px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-top: 15px;
}

.notice-preview-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chatbot-preview-grid-horizontal {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;
}

.chatbot-preview-grid-horizontal .notice-preview-item {
    flex: 0 0 calc(50% - 8px);
    min-width: 0;
}

.notice-preview-item {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.notice-preview-item h5 {
    margin: 0 0 10px 0;
    color: #2c3338;
    font-size: 14px;
    font-weight: 600;
}

.notice-preview-box {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    flex-grow: 1;
}

/* Sample Content */
.sample-content-wrapper {
    background: #fff;
    border-radius: 4px;
}

.sample-content-header {
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e5e5;
}

.sample-content-body {
    font-size: 13px;
    line-height: 1.6;
}

.sample-text {
    margin: 0;
    color: #646970;
    font-size: 13px;
    line-height: 1.6;
}

/* Transparency Preview Styles */
.ai-transparency-banner-preview {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ai-transparency-banner-preview .dashicons {
    color: #fff;
    margin-top: 2px;
}

.ai-transparency-inline-preview {
    background: #f0f7ff;
    border-left: 4px solid #667eea;
    padding: 10px 12px;
    margin: 0;
    font-size: 12px;
    color: #555;
    font-style: italic;
    line-height: 1.5;
}

.ai-transparency-inline-preview em {
    font-style: italic;
}

.ai-transparency-badge-preview {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 12px 18px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ai-transparency-badge-preview .dashicons {
    color: #fff;
    margin-top: 1px;
}

.ai-transparency-modal-trigger-preview {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.ai-transparency-modal-trigger-preview:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Chatbot Preview Styles */
.chatbot-preview-wrapper {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    min-height: 100px;
    padding: 10px;
}

.chatbot-widget-icon {
    width: 50px;
    height: 50px;
    background: #0073aa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.chatbot-banner-preview {
    position: absolute;
    bottom: 65px;
    right: 10px;
    max-width: 220px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);

    .banner-content {
        display: flex;
        align-items: flex-start;
        gap: 8px;
    }

    .chatbot-preview-message {
        flex: 1;
        font-size: 12px;
        line-height: 1.4;
    }

    .close-button {
        background: rgba(255, 255, 255, 0.2);
        border: none;
        color: $color-white;
        font-size: 18px;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        cursor: pointer;
        padding: 0 0 2px 0;
        line-height: 1;
        flex-shrink: 0;
        margin-top: -2px;
    }
}

.chatbot-badge-preview {
    position: absolute;
    bottom: 65px;
    right: 10px;
    background: #667eea;
    color: #fff;
    padding: 8px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-size: 11px;
    font-weight: 600;
    cursor: help;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.chatbot-badge-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.chatbot-inline-preview {
    position: absolute;
    bottom: 65px;
    right: 10px;
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 10px 14px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 180px;
    font-size: 11px;
    color: #555;

    .chatbot-preview-message {
        font-size: 11px;
        color: #555;
    }
}

.chatbot-modal-preview {
    position: absolute;
    bottom: 65px;
    right: 10px;
    background: #667eea;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.chatbot-modal-preview:hover {
    background: #5568d3;
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
}

.chatbot-tooltip-preview {
    position: absolute;
    bottom: 65px;
    right: 10px;
    cursor: help;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #667eea;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s, box-shadow 0.2s;
}

.chatbot-tooltip-preview:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

.chatbot-tooltip-preview::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 50px;
    right: 0;
    background: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    width: 178px;
    white-space: normal;
}

.chatbot-tooltip-preview:hover::before {
    opacity: 1;
}

/* ========================================
   10. MODAL STYLES
   ======================================== */

.admin-chatbot-modal,
.admin-transparency-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.admin-chatbot-modal-content,
.admin-transparency-modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

.admin-chatbot-modal-content h3,
.admin-transparency-modal-content h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-chatbot-modal-content p,
.admin-transparency-modal-content p {
    margin: 0;
    color: #555;
    font-size: 15px;
    line-height: 1.6;
}

.admin-chatbot-modal-close,
.admin-transparency-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    color: #666;
    font-size: 28px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.euaiactready-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.euaiactready-modal.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.euaiactready-bulk-scan-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.65);
}

.euaiactready-modal-dialog {
    position: relative;
    z-index: 1;
    max-width: 520px;
    width: 92%;
    margin: 8vh auto 0;
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.3);
}

.euaiactready-modal-dialog h2 {
    margin: 0 0 12px 0;
    font-size: 20px;
    color: #1f2937;
}

.euaiactready-modal-dialog p {
    margin: 20px 0 20px 0;
    color: #4b5563;
}

.euaiactready-modal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.euaiactready-modal-actions .decide-later:hover,
.euaiactready-modal-actions .decide-later:disabled,
.euaiactready-modal-actions .decide-later[disabled],
.euaiactready-modal-actions .decide-later:disabled:hover,
.euaiactready-modal-actions .decide-later[disabled]:hover {
    background: none !important;
    box-shadow: none !important;
}

.euaiactready-bulk-scan-message-spinner {
    float: left;
    margin: 4px 0px !important;
}
.euaiactready-bulk-scan-message .spinner {
    margin-left: 0px;
    margin-top: -2px;
}


#euaiactready-bulk-scan-save.is-loading {
    position: relative;
    padding-right: 36px;
}

#euaiactready-bulk-scan-save.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 12px;
    width: 14px;
    height: 14px;
    margin-top: -7px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-top-color: #fff;
    border-radius: 50%;
    animation: euaiactready-spin 0.8s linear infinite;
}

@keyframes euaiactready-spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   11. BADGES & INDICATORS
   ======================================== */

/* Legacy detection type badges */
.detection-type {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.detection-type-plugin {
    background: #e3f2fd;
    color: #1976d2;
}

.detection-type-theme {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* Confidence Badges */
.confidence-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

.confidence-high {
    background: #d32f2f;
    color: #fff;
}

.confidence-medium {
    background: #f57c00;
    color: #fff;
}

.confidence-low {
    background: #fbc02d;
    color: #000;
}

/* ========================================
   12. RESPONSIVE STYLES
   ======================================== */

/* Scan CTA Responsive */
@media (max-width: 782px) {
    .euaiactready-scan-cta {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .scan-cta-form {
        align-items: center;
    }

    .scan-cta-hint {
        text-align: center;
    }
}

/* General Mobile Styles */
@media (max-width: 768px) {
    .euaiactready-stats {
        grid-template-columns: 1fr;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
    }

    .scan-log-content {
        font-size: 12px;
        max-height: 300px;
    }

    .ai-modal-content {
        width: 95%;
        padding: 20px;
    }
}

/* DataTables Responsive */
@media (max-width: 768px) {
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        float: none;
        text-align: left;
        margin-bottom: 10px;
    }

    .dataTables_wrapper .dataTables_filter input {
        min-width: 100%;
        margin-top: 5px;
        margin-left: 0;
    }

    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        float: none;
        text-align: center;
    }
}

/* Settings Preview Responsive */
@media (max-width: 1200px) {
    .notice-preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .chatbot-preview-grid-horizontal .notice-preview-item {
        flex: 1 1 calc(50% - 10px);
    }
}

@media (max-width: 782px) {
    .notice-preview-grid {
        grid-template-columns: 1fr;
    }

    .chatbot-preview-grid-horizontal {
        flex-direction: column;
    }

    .chatbot-preview-grid-horizontal .notice-preview-item {
        flex: 1 1 100%;
    }
}

/* Modal Responsive */
@media (max-width: 600px) {
    .admin-chatbot-modal-content,
    .admin-transparency-modal-content {
        padding: 20px;
        margin: 20px;
    }

    .admin-chatbot-modal-content h3,
    .admin-transparency-modal-content h3 {
        font-size: 18px;
    }

    .admin-chatbot-modal-content p,
    .admin-transparency-modal-content p {
        font-size: 14px;
    }
}

/* ========================================
   13. ANIMATIONS & UTILITIES
   ======================================== */

/* Stat Pulse Animation */
@keyframes statPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Slide In Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Blink Animation */
@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

/* Modal Slide In Animation */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Spin Animation */
@keyframes ai-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

// Generic spin animation (used by scan button spinner)
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.dashicons.ai-spin {
    animation: ai-spin 1s linear infinite;
}

/* ========================================
   AI COLUMN ICONS & LABELS
   ======================================== */

.ai-column-yes-icon {
    color: #d63638;
}

.ai-column-minus-icon {
    color: #dcdcde;
}

.ai-column-label {
    color: #d63638;
    font-weight: 500;
}

/* ========================================
   MEDIA LABEL STYLE EXAMPLES
   ======================================== */

.media-label-examples-container {
    background: #f9f9f9;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.media-label-examples-grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.media-label-example-item {
    flex: 1;
    min-width: 220px;

    h5 {
        margin-top: 0;
    }
}

.media-example-box {
    background: white;
    padding: 10px;
    border: 1px solid #ddd;
    position: relative;
}

.media-example-image {
    width: 100%;
    height: 150px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    position: relative;
}

.media-caption-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
    background: #f0f7ff;
    border-left: 3px solid #667eea;
    margin-top: 5px;
    font-size: 12px;
}

.media-badge-label {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(102, 126, 234, 0.95);
    color: white;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 3px;
}

.media-example-image-with-overflow {
    width: 100%;
    height: 150px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    position: relative;
    overflow: hidden;
}

.media-overlay-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
}

.media-overlay-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.95);
    color: #667eea;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.media-border-example-wrapper {
    padding: 10px;
}

.media-border-frame {
    border: 3px solid #667eea;
    border-radius: 8px;
    padding: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.media-border-image {
    width: 100%;
    height: 150px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    font-weight: bold;
    color: #667eea;
}

.media-border-label {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 3px;
}

/* ========================================
   SCAN & PROGRESS STYLES
   ======================================== */

.scan-toggle-icon {
    vertical-align: middle;
}

.scan-button-icon {
    animation: spin 1s linear infinite;
    margin-right: 5px;
    vertical-align: middle;
    margin-top: -2px;
}

.scan-progress-bar {
    width: 100%;
    height: 30px;
    background: #f0f0f1;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.scan-progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.scan-progress-text {
    text-align: center;
    font-weight: 600;
    color: #333;
}

.scan-complete-icon {
    vertical-align: middle;
    margin-right: 5px;
}

.scan-success-icon {
    vertical-align: middle;
    margin-left: 5px;
}

.scan-refresh-icon {
    margin-right: 5px;
}

.scan-refresh-button {
    margin-left: 10px;
}

.live-results-notice {
    margin: 20px 0;
}

/* ========================================
   ICON UTILITIES
   ======================================== */

.dashicons-success {
    color: #46b450;
}

.dashicons-error {
    color: #dc3232;
}

.euaiactready-recheck-message {
    display: none;
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 4px;

    &.success {
        background-color: #d4edda;
        border: 1px solid #c3e6cb;
        color: #155724;
        display: block;
    }

    &.error {
        background-color: #f8d7da;
        border: 1px solid #f5c6cb;
        color: #721c24;
        display: block;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

// Loading/disabled state for links
.is-loading {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

// Success state for scan indicator
.scan-complete {
    color: #388e3c;
}
