/**
 * Admin Table Styles
 * Custom styles for admin tables
 */

/* Remove vertical borders from table cells - more specific selectors */
body .table.table-bordered td,
body .table-bordered td,
.card-body .table-bordered td,
.table-responsive .table-bordered td {
    border-left: none !important;
    border-right: none !important;
}

/* Keep borders for th elements */
body .table.table-bordered th,
body .table-bordered th,
.card-body .table-bordered th,
.table-responsive .table-bordered th {
    border-left: 1px solid #dee2e6 !important;
    border-right: 1px solid #dee2e6 !important;
}

/* Keep first and last column borders for visual closure */
body .table.table-bordered td:first-child,
body .table-bordered td:first-child,
.card-body .table-bordered td:first-child,
.table-responsive .table-bordered td:first-child {
    border-left: 1px solid #dee2e6 !important;
}

body .table.table-bordered td:last-child,
body .table-bordered td:last-child,
.card-body .table-bordered td:last-child,
.table-responsive .table-bordered td:last-child {
    border-right: 1px solid #dee2e6 !important;
}

/* Action icon hover effect - purple color with more specific selectors */
body .action-icon,
body a.action-icon,
.table .action-icon,
.list-inline-item .action-icon {
    color: #98a6ad !important;
    transition: color 0.2s ease !important;
}

body .action-icon:hover,
body a.action-icon:hover,
.table .action-icon:hover,
.list-inline-item .action-icon:hover,
.list-inline-item:hover .action-icon {
    color: #802FFF !important;
}

/* List inline item with action icon */
body .list-inline-item .action-icon,
.table .list-inline-item .action-icon {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    border-radius: 4px;
    transition: all 0.2s ease !important;
}

body .list-inline-item .action-icon:hover,
.table .list-inline-item .action-icon:hover,
.list-inline-item:hover .action-icon {
    background-color: rgba(128, 47, 255, 0.1) !important;
    color: #802FFF !important;
}

/* Ensure icons inside action-icon also change color */
body .action-icon i,
.table .action-icon i,
.list-inline-item .action-icon i {
    transition: color 0.2s ease !important;
}

body .action-icon:hover i,
.table .action-icon:hover i,
.list-inline-item .action-icon:hover i,
.list-inline-item:hover .action-icon i {
    color: #802FFF !important;
}

/* Additional styles for better table appearance */
.table-bordered {
    border: 1px solid #dee2e6 !important;
}

.table-bordered thead th {
    border-bottom: 2px solid #dee2e6 !important;
    background-color: #f8f9fa;
}

/* Hover effect for table rows */
.table-hover tbody tr:hover {
    background-color: rgba(128, 47, 255, 0.02) !important;
}

/* Remove double borders */
.table-bordered thead th:not(:last-child) {
    border-right: 1px solid #dee2e6 !important;
}

.table-bordered tbody tr td {
    border-top: 1px solid #dee2e6 !important;
}

/* Extra specific selectors for stubborn styles */
#wrapper .content-page .content .table-bordered td,
#wrapper .table-bordered td {
    border-left: 0 !important;
    border-right: 0 !important;
}

#wrapper .content-page .content .table-bordered td:first-child,
#wrapper .table-bordered td:first-child {
    border-left: 1px solid #dee2e6 !important;
}

#wrapper .content-page .content .table-bordered td:last-child,
#wrapper .table-bordered td:last-child {
    border-right: 1px solid #dee2e6 !important;
}

/* Extra specific for action icons */
#wrapper .action-icon:hover,
#wrapper a.action-icon:hover,
#wrapper .list-inline-item .action-icon:hover,
#wrapper .list-inline-item:hover .action-icon,
.content-page .action-icon:hover {
    color: #802FFF !important;
}

/* Total count display styling - h7_20_B style from Figma */
.total-count {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-style: normal !important;
    font-weight: 700 !important;
    font-size: 20px !important;
    line-height: 140% !important; /* 28px */
    letter-spacing: -0.03em !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 10px 0 !important;
    display: inline-block !important;
}

/* Number part in purple (primary color) */
.total-count .count-number {
    color: #802FFF !important;
    font-weight: 700 !important;
}

/* Unified button styles for admin pages */
.btn-admin-default {
    background: #FFFFFF !important;
    border: 1px solid #E5E5E5 !important;
    color: #666666 !important;
    font-weight: 500 !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.btn-admin-default:hover {
    background: #F8F8F8 !important;
    border-color: #CCCCCC !important;
    color: #333333 !important;
}

.btn-admin-default i {
    color: #666666 !important;
    font-size: 16px !important;
}

.btn-admin-default:hover i {
    color: #333333 !important;
}

/* Apply to specific button types */
.btn-danger.btn-admin-default,
.btn-warning.btn-admin-default,
.btn-success.btn-admin-default,
.btn-primary.btn-admin-default,
.btn-info.btn-admin-default,
.btn-secondary.btn-admin-default {
    background: #FFFFFF !important;
    border: 1px solid #E5E5E5 !important;
    color: #666666 !important;
}

.btn-danger.btn-admin-default:hover,
.btn-warning.btn-admin-default:hover,
.btn-success.btn-admin-default:hover,
.btn-primary.btn-admin-default:hover,
.btn-info.btn-admin-default:hover,
.btn-secondary.btn-admin-default:hover {
    background: #F8F8F8 !important;
    border-color: #CCCCCC !important;
    color: #333333 !important;
}

/* Pagination center alignment */
.pagination-wrapper {
    display: flex !important;
    justify-content: center !important;
    margin: 20px 0 !important;
}

.pagination {
    margin: 0 !important;
}

/* Override float-end for pagination */
.float-end .pagination,
.text-end .pagination {
    float: none !important;
}

/* Pagination style overrides */
.pagination .page-link {
    color: #666666 !important;
    background-color: #FFFFFF !important;
    border: 1px solid #E5E5E5 !important;
    padding: 8px 12px !important;
    margin: 0 2px !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
}

.pagination .page-link:hover {
    color: #802FFF !important;
    background-color: #F8F6FF !important;
    border-color: #802FFF !important;
}

/* Current/Active page - purple background with white text */
.pagination .page-item.active .page-link,
.pagination .active .page-link,
.pagination .page-link.active,
.pagination strong {
    background-color: #802FFF !important;
    border-color: #802FFF !important;
    color: #FFFFFF !important;
    font-weight: 600 !important;
}

/* Disabled state */
.pagination .page-item.disabled .page-link,
.pagination .disabled .page-link {
    color: #CCCCCC !important;
    background-color: #F8F8F8 !important;
    border-color: #E5E5E5 !important;
    cursor: not-allowed !important;
}

/* Remove bootstrap's box-shadow on focus */
.pagination .page-link:focus {
    box-shadow: none !important;
}

/* Style for pagination that uses strong tags or spans for current page */
.pagination strong,
.pagination span.current {
    display: inline-block !important;
    padding: 8px 12px !important;
    margin: 0 2px !important;
    background-color: #802FFF !important;
    color: #FFFFFF !important;
    border: 1px solid #802FFF !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
}