/* Basic Accordion Styles for RANK AI Fixes Tab */
#rank-fixes-accordion .rank-accordion-item {
    border: 1px solid #ccd0d4;
    margin-bottom: -1px; /* Collapse borders */
}

#rank-fixes-accordion .rank-accordion-item:first-child {
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
}
#rank-fixes-accordion .rank-accordion-item:last-child {
    border-bottom-left-radius: 3px;
    border-bottom-right-radius: 3px;
    margin-bottom: 0;
}

#rank-fixes-accordion .rank-accordion-header {
    background-color: #f6f7f7;
    border: none;
    border-bottom: 1px solid #ccd0d4;
    padding: 10px 15px;
    width: 100%;
    text-align: left;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}
#rank-fixes-accordion .rank-accordion-item:last-child .rank-accordion-header {
     border-bottom: none; /* No bottom border if content is hidden */
}
#rank-fixes-accordion .rank-accordion-item:last-child .rank-accordion-header.rank-accordion-open {
     border-bottom: 1px solid #ccd0d4; /* Add border back when open */
}


#rank-fixes-accordion .rank-accordion-header:hover {
    background-color: #f0f0f1;
}

#rank-fixes-accordion .rank-accordion-header .rank-accordion-count {
    font-size: 0.9em;
    font-weight: normal;
    color: #50575e;
    margin-left: 10px;
}

#rank-fixes-accordion .rank-accordion-header .rank-accordion-toggle-icon {
    transition: transform 0.2s ease-in-out;
    color: #50575e;
}

#rank-fixes-accordion .rank-accordion-header.rank-accordion-open .rank-accordion-toggle-icon {
    transform: rotate(180deg);
}

#rank-fixes-accordion .rank-accordion-content {
    padding: 15px;
    border-top: 1px solid #ccd0d4; /* Separator line */
    background-color: #fff;
}

#rank-fixes-accordion .rank-accordion-table-container {
    overflow-y: auto;
    margin-bottom: 15px;
}

#rank-fixes-accordion .rank-fixes-table {
    width: 100%;
    border-collapse: collapse;
}

#rank-fixes-accordion .rank-fixes-table th,
#rank-fixes-accordion .rank-fixes-table td {
    border: 1px solid #e5e5e5;
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
    word-break: break-word; /* Prevent long URLs/text from breaking layout */
}

#rank-fixes-accordion .rank-fixes-table th {
    background-color: #f9f9f9;
    font-weight: 600;
}

#rank-fixes-accordion .rank-accordion-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #e5e5e5;
    font-size: 0.9em;
}

#rank-fixes-accordion .rank-pagination-controls {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 20px;
}

#rank-fixes-accordion .rank-pagination-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

#rank-fixes-accordion .rank-pagination-bottom {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

#rank-fixes-accordion .rank-pagination-controls button {
    margin-left: 5px;
}

#rank-fixes-accordion .rank-pagination-info {
    color: #50575e;
}

#rank-fixes-accordion .rank-per-page-select {
    border: 1px solid #8c8f94;
    border-radius: 3px;
    background-color: #fff;
    font-size: 0.9em;
    padding: 2px 30px 2px 10px;
    min-width: 100px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23505575e' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    box-sizing: border-box;
}

#rank-fixes-accordion .rank-page-input {
    border: 1px solid #8c8f94;
    border-radius: 3px;
    background-color: #fff;
    font-size: 0.9em;
    text-align: center;
    padding: 2px 8px;
    width: 60px;
    box-sizing: border-box;
}

#rank-fixes-accordion .rank-page-input:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

#rank-fixes-accordion .rank-accordion-loading,
#rank-fixes-accordion .rank-accordion-no-data {
     color: #50575e;
     padding: 20px;
     text-align: center;
}

/* Edit functionality styles */
.rank-edit-icon {
    cursor: pointer;
    margin-left: 5px;
    color: #0073aa;
    vertical-align: middle;
}

.rank-edit-icon:hover {
    color: #00a0d2;
}

.rank-edit-container {
    margin-top: 5px;
}

.rank-save-btn {
    margin-right: 5px !important;
}