/**
 * Admin Styles for Affiliate Hub - Optimized Version
 */

/* Universal overflow prevention with hardware acceleration */
html {
    overflow-x: hidden;
}

body.wp-admin {
    overflow-x: hidden;
}

/* Meta Box Styles - Optimized */
.affiliate-hub-meta-box {
    margin: 0;
    will-change: contents; /* GPU acceleration for dynamic content */
}

.affiliate-hub-meta-box .form-table {
    margin-top: 0;
    border-collapse: collapse; /* Performance optimization */
}

.affiliate-hub-meta-box .form-table th {
    width: 150px;
    padding: 15px 10px 15px 0;
    vertical-align: top; /* Consistency */
}

.affiliate-hub-meta-box .form-table td {
    padding: 15px 10px;
    vertical-align: top;
}

/* Link Options */
.affiliate-hub-link-options p {
    margin: 15px 0;
}

.affiliate-hub-link-options label {
    font-weight: 500;
    cursor: pointer; /* UX improvement */
}

/* Main Dashboard Styles - Flexbox optimized */
.affiliate-hub-stats {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
    align-items: flex-start; /* Prevent stretching */
}

.affiliate-hub-stats .stat-box {
    background: #fff;
    padding: 20px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    text-align: center;
    min-width: 150px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.affiliate-hub-stats .stat-box h3 {
    margin: 0;
    font-size: 2em;
    color: #0073aa;
    font-weight: 600;
}

.affiliate-hub-stats .stat-box p {
    margin: 5px 0 0 0;
    color: #666;
    font-size: 14px;
}

/* Recent Links Table */
.affiliate-hub-recent-links {
    margin-top: 30px;
}

.affiliate-hub-recent-links .wp-list-table {
    margin-top: 10px;
}

/* Statistics Box */
.affiliate-hub-click-stats {
    padding: 0;
}

.affiliate-hub-click-stats p {
    margin: 10px 0;
}

.affiliate-hub-click-stats .click-count {
    font-size: 18px;
    font-weight: bold;
    color: #0073aa;
}

/* Settings Page */
.affiliate-hub-settings-info {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    padding: 20px;
    margin-top: 20px;
    border-radius: 3px;
}

.affiliate-hub-settings-info h2 {
    margin-top: 0;
    color: #333;
}

/* Simplified Stats Page Styles */
.affiliate-hub-stats-page {
    max-width: 100vw;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden !important;
}

.affiliate-hub-stats-page .wrap {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    padding: 0 20px;
    margin: 0;
}

/* Prevent all child elements from overflowing */
.affiliate-hub-stats-page *,
.affiliate-hub-stats-page *:before,
.affiliate-hub-stats-page *:after {
    box-sizing: border-box;
    max-width: 100%;
}

/* Specifically target potentially problematic elements */
.affiliate-hub-stats-page select,
.affiliate-hub-stats-page input,
.affiliate-hub-stats-page option {
    max-width: 100% !important;
    word-wrap: break-word;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Date Filter Tabs */
.stats-date-filters {
    background: #fff;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.date-filter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    max-width: 100%;
}

.date-filter-tab {
    padding: 8px 16px;
    border: 1px solid #c3c4c7;
    background: #f6f7f7;
    color: #2c3338;
    cursor: pointer;
    border-radius: 3px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.date-filter-tab:hover {
    background: #e8f0fe;
    border-color: #2271b1;
}

.date-filter-tab.active {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.custom-date-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.custom-date-inputs input[type="date"] {
    padding: 6px 8px;
    border: 1px solid #c3c4c7;
    border-radius: 3px;
}

/* General Filters */
.stats-filters {
    background: #fff;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.filter-search-section {
    display: flex;
    gap: 20px;
    align-items: end;
    flex-wrap: wrap;
    max-width: 100%;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-weight: 500;
    font-size: 13px;
    color: #1d2327;
}

.filter-group select,
.filter-group input[type="text"] {
    min-width: 200px;
    max-width: 100%;
    padding: 6px 8px;
    border: 1px solid #c3c4c7;
    border-radius: 3px;
    box-sizing: border-box;
}

/* Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 20px 0;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 1200px) {
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 782px) {
    .stats-cards {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: #fff;
    padding: 20px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    box-sizing: border-box;
    min-width: 0;
}

.stat-icon {
    font-size: 24px;
    width: 40px;
    text-align: center;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 24px;
    font-weight: 600;
    color: #2271b1;
    line-height: 1.2;
}

.stat-label {
    font-size: 13px;
    color: #646970;
    margin-top: 2px;
}

/* Charts Section */
.stats-charts {
    margin: 20px 0;
    width: 100%;
    box-sizing: border-box;
}

.chart-container {
    background: #fff;
    padding: 20px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    box-sizing: border-box;
    width: 100%;
}

.table-container {
    background: #fff;
    padding: 20px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    box-sizing: border-box;
    width: 100%;
    overflow-x: auto;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
    flex-wrap: wrap;
    gap: 10px;
}

.chart-header h3 {
    margin: 0;
    color: #1d2327;
    font-size: 16px;
}

.chart-controls select {
    padding: 4px 8px;
    border: 1px solid #c3c4c7;
    border-radius: 3px;
    font-size: 13px;
}

.chart-wrapper {
    position: relative;
    height: 300px; /* default for most charts */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.chart-wrapper canvas {
    max-width: 100% !important;
    height: auto !important;
}

/* Stabilize chart canvas to avoid layout jumps during frequent updates */
.chart-wrapper {
    min-height: 0; /* allow chart to size naturally */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    box-sizing: border-box;
}
.chart-wrapper canvas {
    width: 100% !important;
    /* default small size for scanner canvas handled elsewhere */
    height: auto !important;
    will-change: transform, opacity;
    display: block;
    margin: 0 auto;
}

/* Stats page specific: make charts full-width and taller for line charts */
.affiliate-hub-stats-page .chart-wrapper {
    height: 400px !important;
    width: 100% !important;
    max-width: 100% !important;
}

.affiliate-hub-stats-page .chart-wrapper div[id$="-chart"] {
    width: 100% !important;
    max-width: 100% !important;
}

/* Enhanced responsiveness for statistics charts */
.stats-charts {
    width: 100%;
    max-width: 100%;
}

.stats-charts .chart-container {
    width: 100%;
    max-width: 100%;
    margin-bottom: 20px;
}

.stats-charts .chart-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden;
}

/* ApexCharts specific responsive fixes */
.apexcharts-canvas {
    width: 100% !important;
    max-width: 100% !important;
}

.apexcharts-svg {
    width: 100% !important;
    max-width: 100% !important;
}

/* Responsive breakpoints for statistics */
@media (max-width: 1200px) {
    .affiliate-hub-stats-page .chart-wrapper {
        height: 350px !important;
    }
}

@media (max-width: 768px) {
    .affiliate-hub-stats-page .chart-wrapper {
        height: 300px !important;
        padding: 5px !important;
    }
    
    .stats-charts .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .stats-charts .chart-header h3 {
        font-size: 16px;
    }
    
    .stats-charts .chart-controls {
        width: 100%;
    }
    
    .stats-charts .chart-controls select {
        width: 100%;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .affiliate-hub-stats-page .chart-wrapper {
        height: 250px !important;
        padding: 2px !important;
    }
    
    .stats-charts .chart-header h3 {
        font-size: 14px;
    }
}

/* Keep the scanner small by targeting its container */
#ah-scan-chart-container .chart-wrapper {
    height: auto !important;
    min-height: 0 !important;
}
#ah-scan-chart-container .chart-wrapper canvas {
    max-width: 160px !important;
    width: auto !important;
    height: auto !important;
}

/* Make chart wrapper responsive on small screens: stack above table */
@media (max-width: 900px) {
    .chart-wrapper { min-height: 260px; }
}
@media (max-width: 600px) {
    .chart-wrapper { min-height: 220px; }
}

/* ------------------------------------------------------------------
   Link Scanner Table Styles - CONSOLIDATED STABLE VERSION
   ------------------------------------------------------------------ */

/* Link Scanner table container */
.ah-details-table-wrap {
    margin-top: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* smooth scrolling on mobile */
    position: relative;
}

/* Visual scroll indicator for overflowing tables */
.ah-details-table-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.1));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ah-details-table-wrap:hover::after {
    opacity: 1;
}

/* Search box styling to match WordPress admin */
.ah-details-table-wrap .search-box {
    float: right;
    margin: 0 0 5px;
}

.ah-details-table-wrap .search-box input[type="search"] {
    width: 280px;
    margin-right: 8px;
}

/* Table navigation styling */
.ah-details-table-wrap .tablenav {
    clear: both;
    margin: 6px 0 4px;
    height: 30px;
}

.ah-details-table-wrap .tablenav .alignleft {
    float: left;
    clear: left;
    margin: 0 5px 0 0;
}

.ah-details-table-wrap .tablenav .alignleft .actions {
    display: inline-block;
    vertical-align: middle;
}

.ah-details-table-wrap .tablenav select {
    height: 28px;
    line-height: 28px;
    margin-right: 8px;
    vertical-align: top;
}

.ah-details-table-wrap .tablenav-pages {
    float: right;
    margin: 0 0 9px;
}

/* Main table styling - RESPONSIVE LAYOUT */
.ah-details-table-wrap .wp-list-table {
    width: 100% !important;
    clear: both;
    margin: 0;
    border-collapse: collapse !important;
    table-layout: auto !important; /* Changed from fixed to auto for better responsiveness */
    box-sizing: border-box !important;
    max-width: 100% !important; /* Changed from min-width to max-width */
}

/* Force table to fit container */
.ah-details-table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
}

/* Force table header visibility */
.ah-details-table-wrap .wp-list-table thead {
    display: table-header-group !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.ah-details-table-wrap .wp-list-table thead tr {
    display: table-row !important;
}

.ah-details-table-wrap .wp-list-table th,
.ah-details-table-wrap .wp-list-table td {
    padding: 10px 12px !important;
    line-height: 1.4 !important;
    vertical-align: middle !important;
    border-bottom: 1px solid #c3c4c7;
    box-sizing: border-box !important;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ah-details-table-wrap .wp-list-table thead th {
    background: #f7f7f7 !important;
    border-bottom: 1px solid #c3c4c7;
    font-weight: 600 !important;
    text-align: left;
    color: #1e73be !important;
}

/* Sortable column headers */
.ah-details-table-wrap .wp-list-table .sortable a,
.ah-details-table-wrap .wp-list-table .sorted a {
    display: block;
    color: #0073aa !important;
    text-decoration: none;
    position: relative;
    padding-right: 20px;
}

.ah-details-table-wrap .wp-list-table .sortable a:hover,
.ah-details-table-wrap .wp-list-table .sorted a:hover {
    color: #005177 !important;
}

.ah-details-table-wrap .wp-list-table .sortable .sorting-indicator,
.ah-details-table-wrap .wp-list-table .sorted .sorting-indicator {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border: 4px solid transparent;
}

.ah-details-table-wrap .wp-list-table .sortable .sorting-indicator {
    border-bottom-color: #a7aaad;
}

.ah-details-table-wrap .wp-list-table .sorted.asc .sorting-indicator {
    border-bottom-color: #2271b1;
    border-bottom-width: 5px;
    border-top: 0;
}

.ah-details-table-wrap .wp-list-table .sorted.desc .sorting-indicator {
    border-top-color: #2271b1;
    border-top-width: 5px;
    border-bottom: 0;
}

/* FIXED COLUMN WIDTHS - CONSISTENT FOR BOTH TH AND TD */
.ah-details-table-wrap .wp-list-table .column-cb,
.ah-details-table-wrap .wp-list-table .check-column,
.ah-details-table-wrap .wp-list-table thead .check-column,
.ah-details-table-wrap .wp-list-table tbody .check-column {
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    text-align: center !important;
    padding: 0 4px !important;
    box-sizing: border-box !important;
}

.ah-details-table-wrap .wp-list-table .column-link {
    width: 25% !important;
    min-width: 250px !important;
    white-space: nowrap;
}

.ah-details-table-wrap .wp-list-table .column-label {
    width: 15% !important;
    min-width: 140px !important;
    white-space: nowrap;
}

.ah-details-table-wrap .wp-list-table .column-post {
    width: 80px !important;
    min-width: 80px !important;
    max-width: 80px !important;
    text-align: center !important;
    white-space: nowrap !important;
}

.ah-details-table-wrap .wp-list-table .column-post-type {
    width: 100px !important;
    min-width: 100px !important;
    max-width: 100px !important;
    text-align: left !important;
    white-space: nowrap !important;
}

.ah-details-table-wrap .wp-list-table .column-status {
    width: 100px !important;
    min-width: 100px !important;
    max-width: 100px !important;
    text-align: center !important;
}

.ah-details-table-wrap .wp-list-table .column-code {
    width: 70px !important;
    min-width: 70px !important;
    max-width: 70px !important;
    text-align: center !important;
}

.ah-details-table-wrap .wp-list-table .column-note {
    width: 12% !important;
    min-width: 120px !important;
    white-space: nowrap;
}

.ah-details-table-wrap .wp-list-table .column-actions {
    width: 130px !important;
    min-width: 130px !important;
    max-width: 130px !important;
    text-align: right !important;
}

/* Link styling in table */
.ah-details-table-wrap .wp-list-table .column-link a {
    color: #2271b1;
    text-decoration: none;
    display: inline-block;
    max-width: 90%;
    vertical-align: middle;
}

.ah-details-table-wrap .wp-list-table .column-link a:hover {
    color: #135e96;
    text-decoration: underline;
}

/* Copy button styling */
.ah-details-table-wrap .copy-url-btn {
    background: none;
    border: none;
    color: #646970;
    cursor: pointer;
    padding: 2px;
    margin-left: 5px;
    vertical-align: middle;
    font-size: 14px;
    transition: color 0.2s;
}

.ah-details-table-wrap .copy-url-btn:hover {
    color: #2271b1;
}

.ah-details-table-wrap .copy-url-btn:focus {
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
    border-radius: 2px;
}

/* Open link button styling for Post and Link Text columns */
.ah-details-table-wrap .open-link-btn {
    background: none;
    border: none;
    color: #646970;
    cursor: pointer;
    padding: 2px;
    margin-left: 5px;
    vertical-align: middle;
    font-size: 14px;
    transition: color 0.2s;
    text-decoration: none;
    display: inline-block;
}

.ah-details-table-wrap .open-link-btn:hover {
    color: #2271b1;
    text-decoration: none;
}

.ah-details-table-wrap .open-link-btn:focus {
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
    border-radius: 2px;
}

.ah-details-table-wrap .open-link-btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 1;
}

.ah-details-table-wrap .copy-url-btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 1;
}

/* URL truncation styles for admin table */
.affiliate-url-wrapper {
    display: flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
}

.affiliate-url-link {
    display: inline-block;
    max-width: 350px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: break-all;
}

.url-truncated {
    color: #646970;
    font-weight: normal;
}

/* Copy button for main admin table */
.copy-url-btn {
    background: none;
    border: none;
    color: #646970;
    cursor: pointer;
    padding: 2px;
    margin-left: 0;
    vertical-align: middle;
    font-size: 14px;
    transition: color 0.2s;
    flex-shrink: 0;
}

.copy-url-btn:hover {
    color: #2271b1;
}

.copy-url-btn:focus {
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
    border-radius: 2px;
}

.copy-url-btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 1;
}

/* Column width constraints for affiliate links table */
.post-type-affiliate_hub_link .column-cloaked_url,
.post-type-affiliate_hub_link .column-destination_url {
    max-width: 400px;
    width: 25%;
}

/* WordPress notices for AJAX responses */
.ah-details-table-wrap .notice {
    margin: 5px 0 15px;
    padding: 1px 12px;
}

.ah-details-table-wrap .notice p {
    margin: 0.5em 0;
    padding: 2px;
}

/* Status and code badges */
.ah-details-table-wrap .affiliate-hub-redirect-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    line-height: 1.4;
}

/* Action buttons */
.ah-details-table-wrap .column-actions .button {
    margin-right: 5px;
    font-size: 11px;
    padding: 3px 8px;
    line-height: 1.5;
    height: auto;
}

/* No items message */
.ah-details-table-wrap .no-items td {
    text-align: center;
    color: #646970;
    font-style: italic;
    padding: 20px;
}

/* Hover effects */
.ah-details-table-wrap .wp-list-table tbody tr:hover {
    background: #f6f7f7;
}

/* Responsive adjustments */
@media screen and (max-width: 782px) {
    .ah-details-table-wrap .search-box {
        float: none;
        margin-bottom: 10px;
    }
    
    .ah-details-table-wrap .search-box input[type="search"] {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .ah-details-table-wrap .tablenav .alignleft,
    .ah-details-table-wrap .tablenav-pages {
        float: none;
        clear: both;
        margin-bottom: 10px;
    }
    
    .ah-details-table-wrap .wp-list-table th,
    .ah-details-table-wrap .wp-list-table td {
        padding: 6px 8px;
    }
    
    .ah-details-table-wrap .wp-list-table .column-link,
    .ah-details-table-wrap .wp-list-table .column-label,
    .ah-details-table-wrap .wp-list-table .column-note {
        min-width: 120px;
    }
    
    /* Override min-width for specific columns in mobile */
    .ah-details-table-wrap .wp-list-table .column-post {
        min-width: 100px !important;
    }
    
    .ah-details-table-wrap .wp-list-table .column-post-type {
        min-width: 110px !important;
    }
}

/* Ensure WP list table headers are visible and styled consistently */
.wp-list-table thead th {
    background: #f1f1f1 !important;
    color: #1e73be !important; /* link-like color for sortable headers */
    font-weight: 600 !important;
    border-bottom: 1px solid #e5e5e5 !important;
}
.wp-list-table thead th, .wp-list-table thead td {
    padding: 12px 14px !important;
}
/* Ensure thead is visible if some admin styles hide it */
.ah-details-table-wrap .wp-list-table thead { display: table-header-group !important; }
/* Style sortable header links like WP core */
.wp-list-table thead th a { color: #0073aa !important; text-decoration: none; }
.wp-list-table thead th.sorted a { color: #005177 !important; }

/* Ensure check-column header is visible */
.wp-list-table thead .check-column { width: 40px; }

/* Highlight updated rows briefly */
.ah-row-updated {
    animation: ah-row-flash 0.9s ease-out;
}
@keyframes ah-row-flash {
    0% { background-color: rgba(255,255,0,0.14); }
    50% { background-color: rgba(255,255,0,0.06); }
    100% { background-color: transparent; }
}

/* Temporary debug banner styling */
#ah-debug-banner { box-shadow: 0 1px 2px rgba(0,0,0,0.04); z-index: 9999; }

/* Reserve space for details/export controls to prevent chart reflow */
#ah-scan-details {
    min-height: 80px;
}

.ah-legend-controls { opacity:0; transform: translateY(6px); transition: opacity 200ms ease, transform 200ms ease; }
.ah-legend-controls.show { opacity:1; transform: translateY(0); }
/* Progress bar */
.ah-progress-track {
    width: 100%;
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}
.ah-progress-fill {
    height: 100%;
    background: linear-gradient(90deg,#28a745,#2db34a);
    width: 0%;
    transition: width 300ms linear;
}
.chart-wrapper.progress-mode canvas { display:none !important; }
.chart-wrapper.progress-mode #ah-scan-progress { display:block !important; }

/* When controls are appended via JS, add the .show class to animate without reflow */

/* Responsive adjustments */
@media (max-width: 782px) {
    .affiliate-hub-stats-page .wrap {
        padding: 0 10px; /* Reduce padding on mobile */
    }
    
    .date-filter-tabs {
        flex-wrap: wrap;
        gap: 5px; /* Reduce gap on mobile */
    }
    
    .date-filter-tab {
        padding: 6px 12px; /* Smaller padding on mobile */
        font-size: 12px;
    }
    
    .filter-search-section {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .filter-group select,
    .filter-group input[type="text"] {
        min-width: auto;
        width: 100%;
    }
    
    .chart-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .stat-card {
        padding: 15px; /* Reduce padding on mobile */
        gap: 10px;
    }
    
    .chart-container,
    .stats-date-filters,
    .stats-filters {
        padding: 15px; /* Reduce padding on mobile */
    }
}

.affiliate-hub-settings-info ol {
    margin: 15px 0;
    padding-left: 25px;
}

.affiliate-hub-settings-info li {
    margin: 8px 0;
    line-height: 1.5;
}

/* Post List Columns */
.column-destination_url {
    width: 30%;
}

.column-clicks {
    width: 80px;
    text-align: center;
}

.column-last_clicked {
    width: 120px;
}

/* Media Button */
.affiliate-hub-media-button {
    margin-left: 5px;
}

.affiliate-hub-media-button .wp-media-buttons-icon {
    margin-right: 5px;
}

/* Link Selector Modal */
.affiliate-hub-modal {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.affiliate-hub-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 3px;
    width: 80%;
    max-width: 800px;
    max-height: 90%;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.affiliate-hub-modal-header {
    padding: 15px 20px;
    background: #fcfcfc;
    border-bottom: 1px solid #ddd;
    position: relative;
}

.affiliate-hub-modal-header h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.4;
}

.affiliate-hub-modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    text-align: center;
    line-height: 28px;
}

.affiliate-hub-modal-close:hover {
    color: #333;
}

.affiliate-hub-modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.affiliate-hub-search-box {
    margin-bottom: 20px;
}

.affiliate-hub-search-box input {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.affiliate-hub-links-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.affiliate-hub-links-list li {
    margin: 0;
    padding: 12px;
    border: 1px solid #ddd;
    margin-bottom: 5px;
    cursor: pointer;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.affiliate-hub-links-list li:hover {
    background-color: #f9f9f9;
}

.affiliate-hub-links-list li.selected {
    background-color: #e6f3ff;
    border-color: #0073aa;
}

.affiliate-hub-link-item .link-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.affiliate-hub-link-item .link-url {
    font-size: 12px;
    color: #666;
    font-family: monospace;
}

.affiliate-hub-link-item .link-stats {
    font-size: 11px;
    color: #999;
    margin-top: 3px;
}

.affiliate-hub-modal-footer {
    padding: 15px 20px;
    background: #fcfcfc;
    border-top: 1px solid #ddd;
    text-align: right;
}

.affiliate-hub-modal-footer button {
    margin-left: 10px;
}

/* Loading State */
.affiliate-hub-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.affiliate-hub-loading .spinner {
    display: inline-block;
    margin-right: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .affiliate-hub-modal-content {
        width: 95%;
        margin: 2% auto;
    }
    
    .affiliate-hub-modal-body {
        max-height: 70vh;
    }
}

/* Custom Column Styles */
.affiliate-hub-clicks-cell {
    font-family: monospace;
    font-weight: bold;
    color: #2271b1;
    cursor: help;
    border-bottom: 1px dotted #666;
}

.affiliate-hub-clicks-cell:hover {
    background-color: #f0f6fc;
    border-radius: 3px;
}

.affiliate-hub-redirect-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.affiliate-hub-redirect-type.redirect-301 {
    background-color: #d4edda;
    color: #155724;
}

.affiliate-hub-redirect-type.redirect-302 {
    background-color: #fff3cd;
    color: #856404;
}

.affiliate-hub-redirect-type.redirect-307 {
    background-color: #cce7ff;
    color: #004085;
}

.affiliate-hub-categories {
    font-size: 12px;
    color: #646970;
}

.affiliate-hub-categories:empty::before {
    content: "—";
    color: #a7aaad;
}

/* Custom Tooltips */
.affiliate-hub-custom-tooltip {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    line-height: 1.4;
    letter-spacing: 0;
}

.affiliate-hub-tooltip {
    background: #333 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25) !important;
}

/* Post list table column widths */
.wp-list-table .column-clicks {
    width: 80px;
}

.wp-list-table .column-categories {
    width: 120px;
}

.wp-list-table .column-redirect_type {
    width: 80px;
}

.wp-list-table .column-destination_url {
    width: 300px;
    word-break: break-all;
}

.wp-list-table .column-last_clicked {
    width: 140px;
}

/* Link Prefix Preview Styles */
#link-preview-container {
    margin-top: 8px !important;
}

#link-preview {
    background: #f6f7f7;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 10px 15px;
    font-family: Consolas, Monaco, 'Courier New', monospace;
    font-size: 14px;
    display: inline-block;
    color: #50575e;
    line-height: 1.5;
    margin: 5px 0;
    min-width: 300px;
}

#link-preview strong {
    color: #2271b1;
    font-weight: 700;
    background: rgba(34, 113, 177, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
}

/* Transition effect for smooth updates */
#link-preview {
    transition: all 0.3s ease-in-out;
}

/* Hover effect */
#link-preview:hover {
    background: #f0f0f1;
    border-color: #8c8f94;
}

/* Link Slug Container Styles */
.affiliate-hub-slug-container {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
}

.slug-prefix, .slug-suffix {
    background: #f6f7f7;
    border: 1px solid #c3c4c7;
    padding: 8px 12px;
    color: #50575e;
    font-family: Consolas, Monaco, 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    white-space: nowrap;
}

.slug-prefix {
    border-right: none;
    border-radius: 4px 0 0 4px;
    background: #e6f3ff;
    font-weight: 600;
    color: #2271b1;
}

.slug-suffix {
    border-left: none;
    border-radius: 0 4px 4px 0;
}

.affiliate-hub-slug-container #link_slug {
    border-radius: 0;
    border-left: none;
    border-right: none;
    font-family: Consolas, Monaco, 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    min-width: 250px;
}

.affiliate-hub-slug-container #link_slug:focus {
    box-shadow: 0 0 0 1px #2271b1;
    border-color: #2271b1;
}

#generate-slug-btn {
    margin-left: 10px;
}

/* Generated Cloaked URL Preview */
#cloaked_url_preview {
    font-family: Consolas, Monaco, 'Courier New', monospace;
    font-size: 14px;
    background-color: #f9f9f9 !important;
    border: 1px solid #c3c4c7;
    color: #50575e;
}

#cloaked-url-actions {
    margin-top: 10px;
}

#copy-success {
    color: #00a32a !important;
    font-weight: 600;
}

/* Pagination Controls */
#posts-per-page-select {
    height: 28px !important;
    vertical-align: top;
    min-width: 120px;
}

.tablenav .actions #posts-per-page-select {
    margin-right: 8px;
}

/* Per page filter styling */
.tablenav-pages {
    display: flex;
    align-items: center;
}

@media (max-width: 782px) {
    #posts-per-page-select {
        height: 30px !important;
        margin-bottom: 5px;
        display: block;
        width: 100%;
    }
}

/* Detailed Statistics Table Styles */
.affiliate-hub-stats-table {
    margin-top: 10px;
}

.affiliate-hub-stats-table .column-ip {
    width: 120px;
    font-family: monospace;
    font-size: 12px;
}

.affiliate-hub-stats-table .column-timestamp {
    width: 140px;
    font-size: 12px;
}

.affiliate-hub-stats-table .column-referer {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.affiliate-hub-stats-table .column-traffic-source,
.affiliate-hub-stats-table .column-os,
.affiliate-hub-stats-table .column-browser,
.affiliate-hub-stats-table .column-device-type,
.affiliate-hub-stats-table .column-country {
    width: 100px;
    font-size: 12px;
}

.affiliate-hub-stats-table .column-clicks {
    width: 60px;
    text-align: center;
}

/* Link Scanner specific styles */
.wp-list-table .ah-status-badge {
    font-size: 12px;
    line-height: 1;
}
.wp-list-table .ah-code-badge {
    font-size: 12px;
    line-height: 1;
}
.wp-list-table td.column-link a { display:inline-flex; align-items:center; gap:8px; }
.wp-list-table td { vertical-align: middle; }
.wp-list-table .column-actions { text-align: right; }

/* Responsive table adjustments */
@media (max-width: 1200px) {
    .affiliate-hub-stats-table .column-referer {
        max-width: 150px;
    }
}

/* Chart Fallback Styles - WordPress.org compliance */
.chart-fallback {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.chart-fallback h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #1d2327;
    font-size: 16px;
    font-weight: 600;
}

.chart-fallback .widefat {
    margin-bottom: 10px;
    border: 1px solid #c3c4c7;
}

.chart-fallback .widefat th {
    background: #f6f7f7;
    font-weight: 600;
    border-bottom: 1px solid #c3c4c7;
}

.chart-fallback .total-clicks {
    color: #2271b1;
    font-weight: 600;
}

.chart-fallback .unique-clicks {
    color: #00a32a;
    font-weight: 600;
}

.chart-fallback .description {
    color: #646970;
    font-style: italic;
    margin: 10px 0 0 0;
    font-size: 13px;
}

/* Loading state for charts */
.chart-container {
    position: relative;
    min-height: 300px;
}

.chart-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255,255,255,0.9);
    padding: 20px;
    border-radius: 4px;
    text-align: center;
    z-index: 10;
}

@media (max-width: 782px) {
    .affiliate-hub-stats-table {
        font-size: 11px;
    }
    
    .affiliate-hub-stats-table .column-ip,
    .affiliate-hub-stats-table .column-timestamp {
        width: auto;
        min-width: 80px;
    }
    
    .affiliate-hub-stats-table .column-referer {
        max-width: 100px;
    }
    
    .chart-fallback {
        padding: 15px;
        margin: 15px 0;
    }
}

/* Align table headers with cells and allow wrapping of long content */
.ah-details-table-wrap .wp-list-table {
    width: 100% !important;
    table-layout: fixed !important; /* force column widths to align between thead and tbody */
}

/* If thead accidentally duplicated, hide the second one so headers don't misalign */
.ah-details-table-wrap .wp-list-table thead + thead { display: none !important; }

.ah-details-table-wrap .wp-list-table th,
.ah-details-table-wrap .wp-list-table td {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    vertical-align: middle !important;
}



/* Ensure links inside cells wrap and don't overflow the cell */
.ah-details-table-wrap .wp-list-table td.column-link a { display:inline-block; max-width:100%; white-space:normal; }

/* Reduce padding on header cells to improve visual alignment */
.ah-details-table-wrap .wp-list-table thead th { padding: 10px 12px !important; }
.ah-details-table-wrap .wp-list-table tbody td { padding: 10px 12px !important; }


/* ------------------------------------------------------------------
   Strong overrides to ensure Link Scanner table headers are always
   visible (defensive against admin themes that hide thead) and to
   guarantee the Chart.js canvas renders as a true square without
   clipping or horizontal squashing.
   ------------------------------------------------------------------ */

/* Force the table header to render and be visible */
.ah-details-table-wrap, .ah-details-table-wrap .wp-list-table {
    overflow: visible !important;
}
.ah-details-table-wrap .wp-list-table thead {
    display: table-header-group !important;
    visibility: visible !important;
    opacity: 1 !important;
}
.ah-details-table-wrap .wp-list-table thead th,
.ah-details-table-wrap .wp-list-table thead td {
    display: table-cell !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    line-height: 1.4 !important;
    vertical-align: middle !important;
}
/* Ensure header row remains above other content (non-invasive) */
.ah-details-table-wrap .wp-list-table thead th {
    background: #f7f7f7 !important;
    color: #1e73be !important;
    font-weight: 600 !important;
}

/* Defensive: some admin themes set display:none on thead > tr; undo that */
.ah-details-table-wrap .wp-list-table thead tr { display: table-row !important; }

/* Chart canvas: make it a true square, centered, and avoid clipping */
.chart-wrapper {
    /* let width be responsive but don't force a fixed height */
    height: auto !important;
    min-height: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px 10px !important;
}
.chart-wrapper canvas {
    display: block !important;
    box-sizing: content-box !important;
    width: 100% !important;
    max-width: 260px !important; /* moderate upper bound for desktop */
    height: auto !important;
    max-height: none !important;
    aspect-ratio: 1 / 1 !important; /* enforce square ratio */
    padding: 0 !important;
    margin: 0 auto !important;
}

/* If Chart.js still crops due to internal drawing, allow slight padding inside container */
.chart-wrapper > canvas { padding: 6px !important; }

/* When using the progress-mode, keep the progress bar layout stable */
.chart-wrapper.progress-mode { min-height: 64px !important; }

/* ------------------------------------------------------------------
   Alignment fixes: make sure thead and tbody share the same box model
   and column widths so headers do not appear shifted to the left.
   These rules are defensive: they apply the same width hints to both
   header (th) and cell (td) elements and guarantee border-collapse
   and box-sizing so percent widths compute identically.
   ------------------------------------------------------------------ */
.ah-details-table-wrap {
    padding: 0 !important;
    margin: 0 !important;
}
.ah-details-table-wrap .wp-list-table {
    width: 100% !important;
    /* Use fixed layout for consistent column widths */
    table-layout: fixed !important;
    border-collapse: collapse !important; /* ensure borders don't add extra width */
    box-sizing: border-box !important;
}

/* Force tbody to behave like a table row group (defensive vs theme overrides) */
.ah-details-table-wrap .wp-list-table tbody {
    display: table-row-group !important;
}

/* Apply identical width hints to both header and body cells */
.ah-details-table-wrap .wp-list-table th.column-link,
.ah-details-table-wrap .wp-list-table td.column-link { min-width: 280px !important; box-sizing: border-box !important; }
.ah-details-table-wrap .wp-list-table th.column-label,
.ah-details-table-wrap .wp-list-table td.column-label { min-width: 140px !important; box-sizing: border-box !important; }
.ah-details-table-wrap .wp-list-table th.column-post,
.ah-details-table-wrap .wp-list-table td.column-post { width: 80px !important; box-sizing: border-box !important; text-align: center; }
.ah-details-table-wrap .wp-list-table th.column-post_type,
.ah-details-table-wrap .wp-list-table td.column-post_type { width: 100px !important; box-sizing: border-box !important; text-align: center; }
.ah-details-table-wrap .wp-list-table th.column-status,
.ah-details-table-wrap .wp-list-table td.column-status { width: 90px !important; box-sizing: border-box !important; text-align: center; }
.ah-details-table-wrap .wp-list-table th.column-code,
.ah-details-table-wrap .wp-list-table td.column-code { width: 70px !important; box-sizing: border-box !important; text-align: center; }
.ah-details-table-wrap .wp-list-table th.column-note,
.ah-details-table-wrap .wp-list-table td.column-note { min-width: 160px !important; box-sizing: border-box !important; }
.ah-details-table-wrap .wp-list-table th.column-actions,
.ah-details-table-wrap .wp-list-table td.column-actions { width: 110px !important; box-sizing: border-box !important; text-align: right; }

/* Keep the check column identical in header and body to avoid shift - now handled above */

/* Ensure uniform padding for header and body cells so alignment is consistent */
.ah-details-table-wrap .wp-list-table thead th,
.ah-details-table-wrap .wp-list-table tbody td { padding-left: 12px !important; padding-right: 12px !important; box-sizing: border-box !important; }

/* High specificity styles - consolidated above */

/* High specificity styles - consolidated above */

/* ====================================================================
   MAIN AFFILIATE LINKS TABLE OPTIMIZATION
   ------------------------------------------------------------------ */

/* Let WordPress handle the table layout naturally */
body.post-type-affiliate_hub_link .wp-list-table {
    width: 100%;
    table-layout: auto; /* Natural column sizing */
    border-collapse: collapse;
}

/* Remove overflow restrictions - let WordPress handle responsivity */
body.post-type-affiliate_hub_link .wp-list-table-wrapper,
body.post-type-affiliate_hub_link .tablenav,
body.post-type-affiliate_hub_link form#posts-filter {
    overflow: visible;
}

body.post-type-affiliate_hub_link .wrap form {
    overflow: visible;
}

/* Basic column improvements without fixed widths */
body.post-type-affiliate_hub_link .wp-list-table .column-cb {
    width: 30px;
}

body.post-type-affiliate_hub_link .wp-list-table .column-link_id {
    width: 60px;
    text-align: center;
}

body.post-type-affiliate_hub_link .wp-list-table .column-redirect_type {
    width: 80px;
    text-align: center;
}

body.post-type-affiliate_hub_link .wp-list-table .column-clicks {
    width: 60px;
    text-align: center;
}

body.post-type-affiliate_hub_link .wp-list-table .column-last_clicked {
    width: 120px;
}

body.post-type-affiliate_hub_link .wp-list-table .column-date {
    width: 100px;
}

/* URL truncation and styling for better readability */
body.post-type-affiliate_hub_link .wp-list-table .column-cloaked_url a,
body.post-type-affiliate_hub_link .wp-list-table .column-destination_url a {
    display: block;
    word-break: break-all;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #2271b1;
    text-decoration: none;
}

/* Basic hover effects */
body.post-type-affiliate_hub_link .wp-list-table .column-cloaked_url a:hover,
body.post-type-affiliate_hub_link .wp-list-table .column-destination_url a:hover {
    text-decoration: underline;
}

/* ====================================================================
   RESPONSIVE DESIGN FOR LINK SCANNER
   ------------------------------------------------------------------ */

/* Tablet Portrait and smaller (768px and below) */
@media (max-width: 768px) {
    /* Make scan controls stack vertically */
    #ah-scan-status > div[style*="display:flex"] {
        display: block !important;
        gap: 0 !important;
    }
    
    #ah-scan-status > div[style*="display:flex"] > div:first-child {
        flex: none !important;
        margin-bottom: 20px;
    }
    
    #ah-scan-status > div[style*="display:flex"] > div:last-child {
        flex: none !important;
    }
    
    /* Chart wrapper responsive */
    .chart-wrapper {
        min-height: 200px !important;
        margin-bottom: 15px;
    }
    
    /* Table horizontal scroll */
    .ah-details-table-wrap {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    
    .ah-details-table-wrap .wp-list-table {
        min-width: 800px; /* Minimum width to prevent cramping */
    }
    
    /* Hide less important columns on tablets */
    .ah-details-table-wrap .wp-list-table .column-code,
    .ah-details-table-wrap .wp-list-table .column-note {
        display: none;
    }
    
    /* Adjust remaining column widths for tablet */
    .ah-details-table-wrap .wp-list-table .column-link { width: 35% !important; min-width: 200px !important; }
    .ah-details-table-wrap .wp-list-table .column-label { width: 20% !important; min-width: 120px !important; }
    .ah-details-table-wrap .wp-list-table .column-post { width: 12% !important; min-width: 60px !important; }
    .ah-details-table-wrap .wp-list-table .column-post-type { width: 15% !important; min-width: 80px !important; }
    .ah-details-table-wrap .wp-list-table .column-status { width: 18% !important; min-width: 90px !important; }
}

/* Mobile Landscape (480px - 768px) */
@media (max-width: 600px) {
    /* Stack controls completely */
    .ah-legend-controls {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        align-items: stretch !important;
    }
    
    .ah-legend-controls button {
        width: 100% !important;
        margin: 0 !important;
    }
    
    /* Chart smaller on mobile landscape */
    .chart-wrapper {
        min-height: 150px !important;
    }
    
    /* Hide more columns on small screens */
    .ah-details-table-wrap .wp-list-table .column-label,
    .ah-details-table-wrap .wp-list-table .column-post-type {
        display: none;
    }
    
    /* Adjust columns for mobile landscape */
    .ah-details-table-wrap .wp-list-table .column-link { width: 50% !important; min-width: 180px !important; }
    .ah-details-table-wrap .wp-list-table .column-post { width: 15% !important; min-width: 50px !important; }
    .ah-details-table-wrap .wp-list-table .column-status { width: 20% !important; min-width: 80px !important; }
    .ah-details-table-wrap .wp-list-table .column-actions { width: 15% !important; min-width: 100px !important; }
}

/* Mobile Portrait (480px and below) */
@media (max-width: 480px) {
    /* Page title responsive */
    .wrap h1 {
        font-size: 1.5em !important;
        margin-bottom: 15px !important;
    }
    
    /* Info notice responsive */
    .notice {
        padding: 10px !important;
        margin: 10px 0 !important;
    }
    
    /* Controls section mobile */
    #ah-scan-status h2 {
        font-size: 1.2em !important;
        margin-bottom: 10px !important;
    }
    
    /* Form controls stack and full width */
    #ah-scan-status select,
    #ah-scan-status input[type="search"] {
        width: 100% !important;
        margin-bottom: 10px !important;
    }
    
    /* Buttons stack on mobile */
    #ah-scan-status > div > div:first-child > div {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    #ah-scan-status button {
        width: 100% !important;
        margin: 0 !important;
        padding: 8px 15px !important;
    }
    
    /* Chart very compact on mobile */
    .chart-wrapper {
        min-height: 120px !important;
    }
    
    /* Table: show only essential columns */
    .ah-details-table-wrap .wp-list-table .column-post,
    .ah-details-table-wrap .wp-list-table .column-actions {
        display: none;
    }
    
    .ah-details-table-wrap .wp-list-table {
        min-width: 100% !important; /* Remove horizontal scroll on mobile */
    }
    
    /* Mobile table layout - stack essential info */
    .ah-details-table-wrap .wp-list-table .column-link { 
        width: 60% !important; 
        word-break: break-all !important;
    }
    
    .ah-details-table-wrap .wp-list-table .column-status { 
        width: 40% !important; 
    }
    
    /* Reduce padding on mobile */
    .ah-details-table-wrap .wp-list-table th,
    .ah-details-table-wrap .wp-list-table td {
        padding: 8px 6px !important;
        font-size: 13px !important;
    }
    
    /* Progress bar mobile */
    .ah-progress-track {
        height: 8px !important;
    }
    
    .ah-progress-text {
        font-size: 12px !important;
    }
}

/* Large Desktop (1200px+) - optimize for wide screens */
@media (min-width: 1200px) {
    #ah-scan-status > div[style*="display:flex"] > div:first-child {
        flex: 0 0 400px !important;
    }
    
    .chart-wrapper {
        min-height: 300px !important;
    }
    
    /* More generous column widths on large screens */
    .ah-details-table-wrap .wp-list-table .column-link { min-width: 320px !important; }
    .ah-details-table-wrap .wp-list-table .column-note { min-width: 200px !important; }
}

/* Accessibility and touch improvements */
@media (hover: none) and (pointer: coarse) {
    /* Touch targets */
    .ah-details-table-wrap .wp-list-table button,
    .ah-details-table-wrap .wp-list-table .button {
        min-height: 44px !important;
        padding: 8px 16px !important;
    }
    
    #ah-scan-status button {
        min-height: 44px !important;
        font-size: 16px !important; /* Prevent zoom on iOS */
    }
    
    #ah-scan-status select,
    #ah-scan-status input {
        min-height: 44px !important;
        font-size: 16px !important;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .chart-wrapper canvas {
        image-rendering: -webkit-optimize-contrast !important;
        image-rendering: crisp-edges !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .chart-wrapper {
        background-color: #1e1e1e !important;
        border-color: #404040 !important;
    }
    
    .ah-progress-track {
        background-color: #404040 !important;
    }
    
    .ah-progress-fill {
        background-color: #0073aa !important;
    }
}

/* Additional mobile enhancements */
.ah-details-table-wrap.mobile-scroll {
    position: relative;
}

.ah-details-table-wrap.mobile-scroll::after {
    content: "→";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 18px;
    pointer-events: none;
    opacity: 0.7;
}

/* Loading states for mobile */
.ah-details-table-wrap.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Touch-friendly scanning controls */
@media (max-width: 768px) {
    #ah-scan-status label {
        display: block !important;
        margin-bottom: 5px !important;
        font-weight: 600 !important;
    }
    
    /* Better spacing for mobile forms */
    #ah-scan-status > div > div:first-child > div {
        margin-bottom: 15px !important;
    }
    
    /* Checkbox styling for touch */
    #ah-show-ignored {
        width: 18px !important;
        height: 18px !important;
        margin-right: 8px !important;
    }
}

/* Prevent horizontal scroll issues */
.wrap {
    overflow-x: hidden;
}

/* Status indicator improvements for mobile */
@media (max-width: 480px) {
    .ah-details-table-wrap .wp-list-table .column-status .status-indicator {
        display: block !important;
        text-align: center !important;
        padding: 4px 2px !important;
        border-radius: 3px !important;
        font-size: 11px !important;
        font-weight: 600 !important;
    }
    
    .ah-details-table-wrap .wp-list-table .column-status .status-active {
        background-color: #d4edda !important;
        color: #155724 !important;
    }
    
    .ah-details-table-wrap .wp-list-table .column-status .status-broken {
        background-color: #f8d7da !important;
        color: #721c24 !important;
    }
    
    .ah-details-table-wrap .wp-list-table .column-status .status-forbidden {
        background-color: #fff3cd !important;
        color: #856404 !important;
    }
    
    .ah-details-table-wrap .wp-list-table .column-status .status-pending {
        background-color: #e2e3e5 !important;
        color: #41464b !important;
    }
}

/* Responsive button styles */
@media (max-width: 768px) {
    /* Stack action buttons vertically on mobile */
    .ah-details-table-wrap .wp-list-table .column-actions {
        white-space: normal !important;
    }
    
    .ah-details-table-wrap .wp-list-table .column-actions .button {
        display: block !important;
        width: 100% !important;
        margin: 2px 0 !important;
        padding: 6px 8px !important;
        font-size: 11px !important;
        text-align: center !important;
    }
    
    /* Copy URL button improvements */
    .copy-url-btn {
        padding: 4px 6px !important;
        font-size: 10px !important;
        line-height: 1.2 !important;
    }
}

@media (max-width: 480px) {
    /* Very compact buttons on mobile */
    .ah-details-table-wrap .wp-list-table .column-actions .button {
        font-size: 10px !important;
        padding: 4px 6px !important;
    }
    
    /* Hide less important action buttons on very small screens */
    .ah-details-table-wrap .wp-list-table .ah-ignore-link {
        display: none !important;
    }
}

/* Improved loading states */
.ah-details-table-wrap.loading::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ah-details-table-wrap.loading::after {
    content: "Loading...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 11;
    font-weight: 600;
    color: #666;
}

/* Orientation-specific responsive styles */
@media screen and (max-width: 768px) and (orientation: landscape) {
    /* Landscape mobile/tablet optimizations */
    .chart-wrapper {
        min-height: 120px !important;
        max-height: 200px !important;
    }
    
    /* More compact table rows in landscape */
    .ah-details-table-wrap .wp-list-table th,
    .ah-details-table-wrap .wp-list-table td {
        padding: 6px 8px !important;
    }
}

@media screen and (max-width: 768px) and (orientation: portrait) {
    /* Portrait mobile/tablet optimizations */
    .chart-wrapper {
        min-height: 200px !important;
    }
    
    /* Stack controls completely in portrait */
    #ah-scan-status > div[style*="display:flex"] {
        flex-direction: column !important;
    }
}

/* Print styles for Link Scanner page */
@media print {
    .chart-wrapper,
    #ah-scan-status button,
    .ah-details-table-wrap .wp-list-table .column-actions,
    .notice {
        display: none !important;
    }
    
    .ah-details-table-wrap .wp-list-table {
        border: 1px solid #000 !important;
    }
    
    .ah-details-table-wrap .wp-list-table th,
    .ah-details-table-wrap .wp-list-table td {
        border: 1px solid #000 !important;
        padding: 4px !important;
        font-size: 10px !important;
    }
}

/* Analytics Dashboard Table Styles */
.analytics-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background: #fff;
    border: 1px solid #ddd;
    box-sizing: border-box;
    table-layout: auto;
}

.analytics-table thead th {
    background: #f0f0f1;
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #ddd;
    font-weight: 600;
    color: #1d2327;
}

.analytics-table tbody td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    vertical-align: top;
}

.analytics-table tbody tr:hover {
    background: #f9f9f9;
}

.analytics-table tbody tr:last-child td {
    border-bottom: none;
}

.analytics-table .link-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.analytics-table .link-cell a {
    color: #0073aa;
    text-decoration: none;
}

.analytics-table .link-cell a:hover {
    text-decoration: underline;
}

.analytics-table .number-cell {
    text-align: right;
    font-weight: 600;
}

.analytics-table .date-cell {
    color: #646970;
    font-size: 0.9em;
}

/* New Analytics Layout Styles */
.analytics-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.analytics-card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e5e5e5;
}

.analytics-card-header h3 {
    margin: 0;
    font-size: 16px;
    color: #23282d;
}

.analytics-card-content {
    padding: 20px;
}

.analytics-full-width {
    margin: 20px 0;
    width: 100%;
    clear: both;
}

.analytics-full-width .chart-container.full-width {
    width: 100%;
    margin-bottom: 20px;
    box-sizing: border-box;
}

.analytics-side-by-side {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
    width: 100%;
    box-sizing: border-box;
    clear: both;
}

.analytics-side-by-side .left-column {
    flex: 1 1 40%;
    min-width: 0;
    max-width: calc(40% - 15px);
    box-sizing: border-box;
}

.analytics-side-by-side .right-column {
    flex: 1 1 60%;
    min-width: 0;
    max-width: calc(60% - 15px);
    box-sizing: border-box;
}

.analytics-side-by-side .chart-container,
.analytics-side-by-side .table-container {
    width: 100%;
    margin: 0;
    box-sizing: border-box;
    overflow: hidden;
}

.analytics-side-by-side .table-container {
    overflow-x: auto;
}

/* Enhanced responsive layout */
@media (max-width: 1200px) {
    .analytics-side-by-side {
        gap: 20px;
    }
    
    .analytics-side-by-side .left-column {
        flex: 1 1 45%;
        max-width: calc(45% - 10px);
    }

    .analytics-side-by-side .right-column {
        flex: 1 1 55%;
        max-width: calc(55% - 10px);
        min-width: 280px;
    }
}

@media (max-width: 782px) {
    .analytics-side-by-side {
        flex-direction: column;
        gap: 20px;
    }

    .analytics-side-by-side .left-column,
    .analytics-side-by-side .right-column {
        flex: none;
        min-width: 0;
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .analytics-side-by-side {
        gap: 20px;
        margin: 15px 0;
    }
    
    .analytics-full-width .chart-container.full-width {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .analytics-side-by-side .chart-container,
    .analytics-side-by-side .table-container {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .analytics-side-by-side {
        gap: 15px;
        margin: 10px 0;
    }
    
    .analytics-full-width {
        margin: 15px 0;
    }
    
    .analytics-side-by-side .chart-container,
    .analytics-side-by-side .table-container {
        padding: 12px;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .chart-wrapper,
    .ah-details-table-wrap,
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/*
   ========================================
   LINK SCANNER DASHBOARD STYLES
   ========================================
*/

/* Chart error styling */
.chart-error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 300px;
    background: #f9f9f9;
    border: 2px dashed #ddd;
    border-radius: 8px;
    color: #666;
    font-style: italic;
    text-align: center;
}

/* Link Scanner Navigation Styles */
.analytics-nav-wrapper.linkscanner-nav {
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 20px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.analytics-nav-wrapper.linkscanner-nav .nav-tab {
    font-size: 14px;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.analytics-nav-wrapper.linkscanner-nav .nav-tab:hover {
    background: #f8f9fa;
    border-bottom-color: #3c434a;
}

.analytics-nav-wrapper.linkscanner-nav .nav-tab.nav-tab-active {
    background: #fff;
    border-bottom-color: #0073aa;
    color: #0073aa;
    font-weight: 600;
}

/* Scanner Controls Styling */
.scanner-controls-section {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.scanner-controls-section h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.scanner-control-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.scanner-control-buttons .button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    height: 36px;
    padding: 0 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.scanner-control-buttons .button-large {
    height: 40px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 500;
}

.scanner-control-buttons .button-primary {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    border-color: #005a87;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0,115,170,0.3);
}

.scanner-control-buttons .button-primary:hover {
    background: linear-gradient(135deg, #005a87 0%, #004a73 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,115,170,0.4);
}

.scanner-control-buttons .button-secondary {
    background: #f1f1f1;
    border-color: #ddd;
    color: #555;
}

.scanner-control-buttons .button-secondary:hover {
    background: #e5e5e5;
    border-color: #ccc;
}

/* Scanner Options Styling */
.scanner-options-section {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 15px;
}

.scanner-option {
    display: block;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 13px;
    color: #555;
    transition: color 0.3s ease;
}

.scanner-option:hover {
    color: #0073aa;
}

.scanner-option input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.1);
}

.content-post-types {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Progress Bar Styling */
.ah-progress-track {
    width: 100%;
    height: 12px;
    background: #e5e5e5;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.ah-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0073aa 0%, #00a0d2 100%);
    border-radius: 6px;
    transition: width 0.6s ease;
    position: relative;
}

.ah-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Table Filters Styling */
.analytics-table-filters {
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.analytics-filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: end;
}

.analytics-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.analytics-filter-group label {
    font-size: 13px;
    font-weight: 600;
    color: #1d2327;
    margin: 0;
}

.analytics-filter-select,
.analytics-filter-input {
    height: 36px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.analytics-filter-select:focus,
.analytics-filter-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

/* Results Table Styling */
.analytics-table-container {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.analytics-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.analytics-table-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 12px 15px;
    font-weight: 600;
    color: #1d2327;
    text-align: left;
    border-bottom: 2px solid #e5e5e5;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.analytics-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.analytics-table tbody tr:hover {
    background-color: #f8f9fa;
}

.analytics-table tbody td {
    padding: 12px 15px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
}

/* Loading State */
.analytics-loading-row {
    background: #f9f9f9;
}

.analytics-loading-cell {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.analytics-loading-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-style: italic;
}

/* Pagination */
.analytics-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e5e5e5;
}

.analytics-pagination-info {
    font-size: 13px;
    color: #666;
}

.analytics-pagination-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.analytics-page-info {
    font-size: 13px;
    color: #555;
    font-weight: 500;
    padding: 0 10px;
}

/* Status Badges */
.link-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.link-status-badge.status-active {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.link-status-badge.status-broken {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.link-status-badge.status-forbidden {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.link-status-badge.status-pending {
    background: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

.link-status-badge.status-skipped {
    background: #cce7ff;
    color: #004085;
    border: 1px solid #b3d7ff;
}

/* Response Code Badges */
.response-code-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.response-code-badge.code-2xx {
    background: #d4edda;
    color: #155724;
}

.response-code-badge.code-3xx {
    background: #fff3cd;
    color: #856404;
}

.response-code-badge.code-4xx {
    background: #f8d7da;
    color: #721c24;
}

.response-code-badge.code-5xx {
    background: #d1ecf1;
    color: #0c5460;
}

/* Action Buttons */
.link-action-buttons {
    display: flex;
    gap: 5px;
    align-items: center;
}

.link-action-button {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #fff;
    color: #666;
    text-decoration: none;
    font-size: 11px;
    transition: all 0.2s ease;
}

.link-action-button:hover {
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
}

.link-action-button.danger:hover {
    background: #dc3545;
    color: #fff;
    border-color: #dc3545;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .analytics-filter-row {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 15px;
    }
    
    .scanner-control-buttons {
        gap: 8px;
    }
}

@media (max-width: 768px) {
    .analytics-filter-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .scanner-control-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .scanner-control-buttons .button {
        width: 100%;
        justify-content: center;
    }
    
    .analytics-pagination {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .analytics-pagination-controls {
        order: -1;
    }
    
    .analytics-table {
        font-size: 12px;
    }
    
    .analytics-table-header {
        padding: 10px;
    }
    
    .analytics-table tbody td {
        padding: 10px;
    }
}

/* Dashicons spinning animation for recheck functionality */
.dashicons-update-spin {
    animation: ah-spin 1s linear infinite;
}

@keyframes ah-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Chart center text styling - force normal font style and better positioning */
#ah-affiliate-scan-chart .apexcharts-datalabel-label,
#ah-affiliate-scan-chart .apexcharts-datalabel-value,
#ah-affiliate-scan-chart text,
#ah-affiliate-scan-chart tspan,
#ah-content-scan-chart .apexcharts-datalabel-label,
#ah-content-scan-chart .apexcharts-datalabel-value,
#ah-content-scan-chart text,
#ah-content-scan-chart tspan {
    font-style: normal !important;
    font-family: Arial, sans-serif !important;
}

/* Ensure center alignment and proper positioning - perfect centering */
#ah-affiliate-scan-chart .apexcharts-datalabel-label,
#ah-content-scan-chart .apexcharts-datalabel-label {
    text-anchor: middle !important;
    dominant-baseline: central !important;
    transform: translateY(0px) !important; /* No additional transform - use offsetY instead */
}

#ah-affiliate-scan-chart .apexcharts-datalabel-value,
#ah-content-scan-chart .apexcharts-datalabel-value {
    text-anchor: middle !important;
    dominant-baseline: central !important;
    transform: translateY(0px) !important; /* No additional transform - use offsetY instead */
}

/* Force visibility for center text elements */
#ah-affiliate-scan-chart .apexcharts-datalabel-label,
#ah-affiliate-scan-chart .apexcharts-datalabel-value,
#ah-content-scan-chart .apexcharts-datalabel-label,
#ah-content-scan-chart .apexcharts-datalabel-value {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* Scanner controls styling to match chart container */
.scanner-controls-content {
    padding: 20px;
    background: #fff;
    min-height: 300px;
}

.scanner-controls-content h4 {
    color: #333;
    font-size: 14px;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.scanner-option {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: #666;
}

.scanner-option input[type="checkbox"] {
    margin-right: 8px;
}

/* Recheck link loading state */
.checking-status {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.checking-status td {
    background-color: #f8f9fa;
}

/* ============================================
   QR Code Modal
   ============================================ */
#affhub-qr-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 100100;
    display: flex;
    align-items: center;
    justify-content: center;
}

#affhub-qr-modal {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 420px;
    width: 90%;
    position: relative;
}

#affhub-qr-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    line-height: 1;
}

#affhub-qr-close:hover {
    color: #d63638;
}

#affhub-qr-title {
    margin: 0 0 15px;
    font-size: 16px;
    font-weight: 600;
}

#affhub-qr-container {
    display: inline-block;
    padding: 15px;
    background: #fff;
    border: 1px solid #ddd;
    margin: 10px 0;
}

#affhub-qr-container canvas {
    display: block;
}

#affhub-qr-container img {
    display: none !important;
    height: 0 !important;
    width: 0 !important;
}

#affhub-qr-url {
    font-size: 12px;
    color: #666;
    word-break: break-all;
    margin: 5px 0 15px;
}

.affhub-qr-actions {
    margin-top: 10px;
}

.affiliate-hub-qr-btn {
    cursor: pointer;
}