@use '../abstracts' as *;

.genform-admin-wrap .wp-list-table {
    border: 1px solid $border;
    border-radius: $radius;
    box-shadow: $shadow-sm;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: $space-sm;
    overflow: hidden;

    thead th {
        background: #F9FAFB;
        border-bottom: 1px solid $border;
        padding: 18px $space-sm;
        font-weight: $weight-bold;
        color: $text-muted;
        text-transform: uppercase;
        font-size: 11px;
        letter-spacing: 0.1em;
        border-right: none;
    }

    tbody td {
        padding: 22px $space-sm;
        border-bottom: 1px solid $border;
        vertical-align: middle;
        border-right: none;
        color: $text-main;
        font-size: $size-base;
    }

    tbody tr {
        transition: $transition-base;

        &:last-child td {
            border-bottom: none;
        }

        &:hover {
            background-color: #F9FAFB !important;
        }
    }
}

.gfm-id-cell {
    display: flex;
    align-items: center;
    gap: $space-xs;
    color: $text-light;
    font-weight: $weight-medium;
}

.gfm-unread-dot-badge {
    width: 8px;
    height: 8px;
    background: $primary;
    border-radius: $radius-full;
    flex-shrink: 0;
    box-shadow: 0 0 0 4px rgba($primary, 0.1);
}

.gfm-table-actions {
    display: flex;
    gap: 10px;
}

.gfm-action-icon {
    @include flex-center;
    width: 34px;
    height: 34px;
    border-radius: $radius-sm;
    background: $white;
    border: 1px solid $border;
    color: $text-muted !important;
    transition: $transition-base;
    text-decoration: none !important;

    &:hover {
        border-color: $primary;
        color: $white !important;
        background: $primary !important;
        transform: translateY(-2px);
        box-shadow: $shadow-md;
    }

    &.gfm-action-delete:hover {
        border-color: $danger;
        background: $danger !important;
    }

    .dashicons {
        font-size: 16px;
        width: 16px;
        height: 16px;
    }
}

.gfm-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: $primary-light;
    color: $primary;
    border-radius: $radius-full;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: $transition-base;

    &:hover {
        background: $primary;
        color: $white;
    }
}

// Form status toggle switch
.gfm-status-toggle {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    position: relative;

    input {
        opacity: 0;
        width: 0;
        height: 0;
        position: absolute;
    }

    .gfm-toggle-slider {
        width: 36px;
        height: 20px;
        background: $border;
        border-radius: 20px;
        transition: $transition-base;
        position: relative;
        flex-shrink: 0;

        &::after {
            content: '';
            position: absolute;
            top: 3px;
            left: 3px;
            width: 14px;
            height: 14px;
            background: $white;
            border-radius: 50%;
            transition: $transition-base;
            box-shadow: 0 1px 3px rgba(0,0,0,0.2);
        }
    }

    input:checked + .gfm-toggle-slider {
        background: $primary;

        &::after {
            transform: translateX(16px);
        }
    }
}

// Starred entry button
.gfm-star-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: $text-light;
    transition: $transition-base;
    line-height: 1;

    &:hover,
    &.gfm-starred {
        color: #f59e0b;
    }

    .dashicons {
        font-size: 18px;
        width: 18px;
        height: 18px;
    }
}