/* Compare button on single tool page */
.toolboxsaas-ct-compare-btn-container {
    display: inline-flex;
}

.toolboxsaas-ct-compare-btn.active {
    background: #A044F4 !important;
    color: #fff;
}

/* Floating compare panel */
.toolboxsaas-ct-panel {
    position: fixed;
    right: -90px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 99999;
    background: #fff;
    border-radius: 12px 0 0 12px;
    box-shadow: -2px 0 15px rgba(0, 0, 0, 0.10);
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: right 0.3s ease;
}
button.toolboxsaas-ct-compare-btn.active {
    color: #fff;
}
.toolboxsaas-ct-panel.visible {
    right: 0;
}

.toolboxsaas-ct-panel-slots {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Panel slots */
.toolboxsaas-ct-slot {
    width: 50px;
    height: 50px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
    transition: border-color 0.2s ease;
}

.toolboxsaas-ct-slot-filled {
    border-style: solid;
    border-color: #e0e0e0;
    background: #fff;
}

.toolboxsaas-ct-slot-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.toolboxsaas-ct-slot-filled .toolboxsaas-ct-slot-img {
    display: block;
}

.toolboxsaas-ct-slot-remove {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.toolboxsaas-ct-slot-filled .toolboxsaas-ct-slot-remove {
    display: flex;
}

/* Go/Compare button in panel */
.toolboxsaas-ct-go-btn {
    width: 50px;
    height: 36px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, opacity 0.2s ease;
}

.toolboxsaas-ct-go-btn:hover {
    background: #2980b9;
}

.toolboxsaas-ct-go-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Compare page table */
.toolboxsaas-ct-table-wrap {
    overflow-x: auto;
    margin: 20px 0;
}

.toolboxsaas-ct-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.toolboxsaas-ct-table th,
.toolboxsaas-ct-table td {
    padding: 12px 16px;
    border: 1px solid #e9ecef;
    vertical-align: top;
    text-align: left;
}

.toolboxsaas-ct-table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.toolboxsaas-ct-label-col {
    width: 160px;
    min-width: 140px;
    background: #f8f9fa;
    font-weight: 600;
}

.toolboxsaas-ct-tool-header {
    text-align: center;
}

.toolboxsaas-ct-tool-header a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.toolboxsaas-ct-tool-header a:hover {
    color: #0073aa;
}

.toolboxsaas-ct-tool-logo {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.toolboxsaas-ct-tool-name {
    font-weight: 600;
    font-size: 14px;
}

/* Pros/Cons lists inside compare table */
.toolboxsaas-ct-table .toolboxsaas-pros-list,
.toolboxsaas-ct-table .toolboxsaas-cons-list {
    padding: 10px;
    border-radius: 8px;
}

.toolboxsaas-ct-table .toolboxsaas-pros-list {
    background: #f3fff8;
}

.toolboxsaas-ct-table .toolboxsaas-cons-list {
    background: #fff3f39e;
}

.toolboxsaas-ct-table .toolboxsaas-pros-list ul,
.toolboxsaas-ct-table .toolboxsaas-cons-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toolboxsaas-ct-table .toolboxsaas-pros-list ul li,
.toolboxsaas-ct-table .toolboxsaas-cons-list ul li {
    padding: 3px 0;
    font-size: 14px;
    line-height: 1.6;
}

.toolboxsaas-ct-table .toolboxsaas-pros-list ul i {
    color: #2ECC71;
    font-size: 12px;
}

.toolboxsaas-ct-table .toolboxsaas-cons-list ul i {
    color: #E74C3C;
    font-size: 12px;
}

/* Attribute group header row */
.toolboxsaas-ct-group-row td {
    background: #edf2f7;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #4a5568;
    padding: 8px 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .toolboxsaas-ct-panel {
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        transform: none;
        flex-direction: row;
        border-radius: 12px 12px 0 0;
        box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.15);
        padding: 10px 16px;
        bottom: -80px;
    }

    .toolboxsaas-ct-panel.visible {
        bottom: 0;
    }

    .toolboxsaas-ct-panel-slots {
        flex-direction: row;
    }

    .toolboxsaas-ct-slot {
        width: 50px;
        height: 50px;
    }

    .toolboxsaas-ct-go-btn {
        margin-top: 0;
        margin-left: 8px;
        height: 50px;
    }

    .toolboxsaas-ct-label-col {
        width: 120px;
        min-width: 100px;
    }
}
