@keyframes ktmp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.ktmp-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: ktmp-spin 1s linear infinite;
    margin: 5px;
}

.ktmp-fixed-button{
    position: fixed;
    bottom: 30px;
    right: 30px;
    height: 40px;
    z-index:999;
}
.ktmp-product-filter{
    display:flex;
    align-items: center;
    gap: 10px;
}
@media (min-width: 768px) {
    .ktmp-product-filter {
        float: right;
        margin-top:50px;
    }
}
.ktmp-product-filter select,
.ktmp-product-filter input[type="text"] {
    border: 1px solid #ccc;
    border-radius: 4px;
}
.ktmp-product-filter button {
    padding: 6px 12px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.ktmp-product-filter button:hover {
    background-color: #005f8d;
}
.pricing-primary, .pricing-rule, .pricing-current-site {
    display: inline-block;
    position: absolute;
    left:0;
    top:0;
    border-right: 10px solid transparent;
    border-left: 0px solid transparent;
}
.pricing-primary {
    border-top: 10px solid #4BB543;
}
.pricing-rule {
    border-top: 10px solid #FFA500;
}
.pricing-current-site{
    border-top: 10px solid #ff0f0f;
}
.pricing-primary:hover::before, .pricing-rule:hover::before, .pricing-current-site:hover::before {
    position: absolute;
    top: -30px;
    right: -55%;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px;
    border-radius: 5px;
    z-index: 1;
    font-size: 12px;
    white-space: nowrap;
}
.ktmp-sort-icon{
    margin-left:2px;
    opacity: 0.5;
    transition: opacity 0.2s ease-in-out;
    cursor: pointer;
}
/* Pagination */
.ktmp-pagination {
    margin-top: 20px;
    margin-bottom: 20px;
}
.ktmp-pagination a,
.ktmp-pagination span {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
}
.ktmp-pagination a:hover {
    background-color: #f0f0f0;
}
.ktmp-pagination .current {
    background-color: #007cba;
    color: #fff;
    border-color: #007cba;
}
.ktmp-pagination .dots {
    cursor: default;
}
.ktmp-pagination .prev,
.ktmp-pagination .next {
    font-weight: bold;
}
.ktmp-pagination .prev:hover,
.ktmp-pagination .next:hover {
    color: #007cba;
    border-color: #007cba;
    background-color: transparent;
}
/* Warning and info boxes */
.ktmp-warning-box {
    background-color: #4CAF50;
    color: white;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
}
.ktmp-warning-box{
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
}
.ktmp-warning-a{
    color: #721c24;
    font-weight: bold;
    text-decoration: underline;
}
/* Table */
.ktmp-table .marketplace-name{
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}
.ktmp-table .marketplace-name img{
    margin-left:5px;
}

.ktmp-table:not(.ktmp-match-table) td, .ktmp-table:not(.ktmp-match-table) th, .ktmp-product-list th, .ktmp-expand-table td{
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
    position:relative;
}

.ktmp-table:not(.ktmp-match-table) thead, .ktmp-product-list thead {
    position: sticky;
    top: 35px;
    z-index:4;
    background-color:#fff;
}

.ktmp-expand-table {
    width: 100%;
    border-collapse: collapse;
            
}
.ktmp-expand-table th {
    background-color: #f2f2f2;
}

.ktmp-expand-table a {
    text-decoration: none;
    word-wrap: break-word;
}
.ktmp-expand-table .ktmp-expand-button {
    background-color: #007BFF!important;
    color: #fff;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
}
.ktmp-expand-table tr.ktmp-sub-row {
    display: none;
}

.ktmp-expand-table tr.ktmp-sub-row.visible {
    display: table-row;
}

/* Price Rules */
.ktmp-input-pair {
    margin-bottom: 10px;
}
.ktmp-remove-btn, #rule-container .remove-select {
    color: red;
    cursor: pointer;
}
/* Product Meta */
.upload_marketplace_image{
  width:20%;
  float:left;
}

/* Product Table */
.ktmp-product-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    min-height:30px;
}

.ktmp-error-icon {
    display:flex;
    align-items: center;
    cursor: pointer;
}

.ktmp-error-tooltip {
    display: none;
    position: absolute;
    bottom: 30px;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 6px 8px;
    border-radius: 4px;
    white-space: nowrap;
    font-size: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.ktmp-error-icon:hover .ktmp-error-tooltip {
    display: block;
}

/* Templates */

.ktmp-update-records-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.ktmp-update-records-list li {
    display: flex;
    flex-direction: column;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
}
.ktmp-update-records-list span {
    font-size: 13px;
    margin-bottom: 6px;
    color: #333;
}
.ktmp-update-records-list img {
    margin-left:10px;
}
.ktmp-update-records-buttons {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
}
.ktmp-update-records-buttons a {
    font-size: 12px;
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid transparent;
}
.ktmp-update-record-start {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}
.ktmp-update-record-delete {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}


/* Modal Box */
.ktmp-close-modal {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  position:absolute;
  top:0;
  right:0;
}

.ktmp-close-modal:hover,
.ktmp-close-modal:focus {
  color: black;
  cursor: pointer;
}

/* Logs */
.ktmp-log-row {
    padding: 2px 8px;
    margin-top:0px;
    margin-bottom: 3px;
    background-color: #f6f7f7;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.ktmp-system-log, .ktmp-info-log{
    border-left: 4px solid #72aee6;
}
.ktmp-error-log{
    border-left: 4px solid #d63638;
}
.ktmp-success-log{
    border-left: 4px solid #00a32a;
}
.ktmp-warning-log{
    border-left: 4px solid #dba617;
}
.ktmp-log-button {
    background: none;
    border: none;
    text-align: left;
    width: 100%;
    padding: 12px 0px;
    cursor: pointer;
    margin-bottom:3px;
}
.ktmp-log-details {
    list-style: none;
    margin: 0;
    padding: 0 15px 10px 30px;
    display: none;
}
.ktmp-log-details li {
    padding: 8px 0;
    font-size: 13px;
    color: #50575e;
    border-bottom: 1px solid #f0f0f1;
}
.ktmp-log-details li:last-child {
    border-bottom: none;
}
.ktmp-log-details li:before {
    content: "•";
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}
.ktmp-error-log li:before{
    color: #d63638;
}
.ktmp-system-log li:before, .ktmp-info-log li:before{
    color: #72aee6;
}
.ktmp-empty {
    color: #50575e;
    font-style: italic;
    margin: 8px 0;
}
