/**
 * File: compcom-admin.css
 * Location: /your-plugin/assets/css/compcom-admin.css
 */

/* ------------------------------
   GENERAL ADMIN STYLES
------------------------------ */
.nav-tab-wrapper {
    margin-bottom: 20px;
    border-bottom: 1px solid #ccc; /* Moved up from the bottom of the file */
}
.nav-tab {
    text-decoration: none;
}
.nav-tab-active {
    background-color: #fff;
    border-bottom: 1px solid #fff;
}

/* Bulk Mapping Page Vertical Tabs */
.vertical-tabs {
    display: flex;
    flex-wrap: wrap;
}
.vertical-tabs .tab-links {
    flex: 0 0 200px;
}
.vertical-tabs .tab-links ul {
    list-style: none;
    padding: 0;
}
.vertical-tabs .tab-links ul li {
    margin-bottom: 5px;
}
.vertical-tabs .tab-links ul li a {
    display: block;
    padding: 10px;
    background: #f1f1f1;
    color: #0073aa;
    text-decoration: none;
    border-radius: 3px;
}
.vertical-tabs .tab-links ul li a.active {
    background: #0073aa;
    color: #fff;
}
.vertical-tabs .tab-content {
    flex: 1;
    padding-left: 20px;
}
.vertical-tabs .tab {
    display: none;
}
.vertical-tabs .tab.active {
    display: block;
}

/* Competitor Field */
.competitor-field {
    margin-bottom: 30px;
}
.competitor-field label {
    font-weight: bold;
}
.competitor-field input[type="url"] {
    width: 100%;
    margin-bottom: 5px;
}
.competitor-field h3 {
    margin-top: 20px;
}

/* COMPCOM Admin Bar Indicator (if used) */
#wp-admin-bar-compcom_admin_bar > .ab-item .compcom-rotating-circle {
    display: inline-block;
    vertical-align: middle;
    position: relative;
    margin-right: 5px;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: #0073aa; /* WordPress admin blue color */
    border-left-color: #0073aa;
    border-radius: 50%;
    animation: compcom-spin 1s linear infinite;
    text-align: center;
}
#wp-admin-bar-compcom_admin_bar > .ab-item .compcom-rotating-circle .compcom-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    color: #555;
    margin: 0;
}
@keyframes compcom-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Product Mappings Table */
.compcom-mappings-table {
    border-collapse: collapse;
    width: 100%;
}
.compcom-mappings-table th,
.compcom-mappings-table td {
    border: 1px solid #ccc;
    vertical-align: top;
    padding: 8px;
}
.compcom-mappings-table th {
    background-color: #f1f1f1;
    text-align: left;
}
.compcom-mappings-table tr:nth-child(even) {
    background-color: #fbfbfb;
}

/* 'Add|View' Link */
.compcom-add-view-mappings {
    color: #0073aa;
    cursor: pointer;
    margin-left: 5px;
}
.compcom-add-view-mappings:hover {
    text-decoration: underline;
}

/* Mappings Container */
.compcom-mappings-container {
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ccc;
}
.compcom-mapping {
    margin-bottom: 10px;
}
.compcom-mapping select,
.compcom-mapping input {
    margin-right: 5px;
}
.compcom-mapping button {
    margin-top: 5px;
}
.compcom-add-mapping {
    margin-top: 10px;
}
.compcom-save-mappings {
    margin-top: 10px;
}
.compcom-save-all-container {
    margin-top: 20px;
}

/* Icon Alignment */
td span.dashicons {
    vertical-align: middle;
}

/* Bulk Mapping Page */
#compcom-bulk-mapping-page {
    max-width: 800px;
}
#compcom-bulk-mapping-page h2 {
    margin-top: 20px;
}
#compcom-upload-form {
    margin-top: 20px;
}
#compcom-upload-form input[type="file"] {
    margin-bottom: 10px;
}

/* Buttons */
#compcom-process-data-now,
#compcom-process-data-now-bottom {
    background-color: #007cba; /* WordPress admin blue */
    color: #ffffff; /* White text */
    border-color: #007cba;
    text-shadow: none;
    box-shadow: none;
    font-size: 16px;
    padding: 10px 20px;
}
#compcom-process-data-now:hover,
#compcom-process-data-now-bottom:hover {
    background-color: #005a9c; /* Darker blue on hover */
    border-color: #005a9c;
    cursor: pointer;
}
#compcom-process-data-now-bottom {
    margin-top: 20px;
}

/* Pagination styles */
.tablenav .tablenav-pages {
    margin: 1em 0;
    font-size: 13px;
}
.tablenav-pages .pagination-links {
    display: inline-block;
}
.tablenav-pages a,
.tablenav-pages span {
    color: #0073aa;
    text-decoration: none;
    padding: 2px 6px;
    border: 1px solid #ccd0d4;
    background: #fff;
    margin-left: -1px;
    line-height: 2;
}
.tablenav-pages .current {
    font-weight: bold;
    color: #fff;
    background: #0073aa;
}
.tablenav-pages a:hover {
    color: #00a0d2;
    background: #f1f1f1;
}
.tablenav-pages .prev-page,
.tablenav-pages .next-page {
    padding: 2px 10px;
}
.tablenav-pages .tablenav-pages-navspan {
    padding: 2px 6px;
    border: 1px solid #ccd0d4;
    background: #f7f7f7;
    margin-left: -1px;
    line-height: 2;
}

/* Reused classes */
.auto-mapped-badge {
    display: inline-block;
    background-color: #46b450;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    vertical-align: middle;
    margin-left: 5px;
}
.compcom-product-image {
    text-align: center;
}
.compcom-product-image img.compcom-thumb {
    max-width: 50px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Competitor Entries */
.compcom-competitor {
    border: 1px solid #ccc;
    padding: 10px;
    margin-bottom: 15px;
}
.compcom-competitor h4 {
    margin-top: 0;
}
.compcom-remove-competitor {
    background-color: #dc3232;
    color: #fff;
}

/* Tooltip styles */
.compcom-tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
}
.compcom-tooltip .compcom-tooltip-text {
    visibility: hidden;
    width: 250px;
    background-color: #555;
    color: #fff;
    text-align: left;
    padding: 5px;
    border-radius: 6px;
    position: absolute;
    z-index: 10000;
    bottom: 125%; /* Position above the icon */
    left: 50%;
    margin-left: -125px;
    opacity: 0;
    transition: opacity 0.3s;
}
.compcom-tooltip .compcom-tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%; /* At the bottom of the tooltip */
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
}
.compcom-tooltip:hover .compcom-tooltip-text {
    visibility: visible;
    opacity: 1;
}
.compcom-test-result {
    display: inline-block;
    margin-left: 10px;
    margin-right: 20px;
    vertical-align: middle;
}
.compcom-confirm-json,
.compcom-try-again-json,
.compcom-confirm-title-json,
.compcom-try-again-title-json {
    margin-right: 10px;
    vertical-align: middle;
}
.compcom-try-with-js-price,
.compcom-try-with-js-title {
    margin-left: 10px;
}




